PDA

View Full Version : x and y positions values on ONE variable?


idkas3
05-16-2010, 01:28 AM
I am trying to figure out how to obtain x and y positions' values on one variable

concept is...

cactus_mc.x = 233;
cactus_mc.y = 32;

two consecutive values of cactus_mcx and y must be applied on one variable

var xandyA = (cactus_mc.x, cactus_mc.y) // error

so I can continue with following functions in the future

if (xandyA == xandyB ){
code
}

cardin
05-18-2010, 08:32 AM
This might be helpful:

var pointA:Point = new Point(10, 14);

var pointB:Point = new Point(5, 14);
pointB.x += 5;

trace(pointA.equals(pointB));
//true!

Point is in the package flash.geom.Point.

ActionScriptRetard
05-25-2010, 06:24 PM
you could try an array..