actionscript 3 - How to Save X Y Position Object in Variable and in Array by AS3? -


how put value x , y position in variable , array

object = (xposition , yposition) box_mc.x = 300 , box_mc.y = 200

try improve question.

is wanna do?

import flash.geom.point;  var p:point = new point(200,300); box_mc.x = p.x; box_mc.y = p.y; 

you may store values in bi-dimensional array here bellow :

var a:array = [[200,300],[150,200]]; box_mc.x = a[0][0]; //200 box_mc.y = a[0][1]; //300 

or in case have stored 2 values posx , posy :

box_mc.x = a[1][0]; //150 box_mc.y = a[1][1]; //200 

you may check links understand difference between different kind of types may store values :

actionscript 3 fundamentals: arrays

actionscript 3 fundamentals: associative arrays, maps, , dictionaries

actionscript 3 fundamentals: vectors , bytearrays


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -