[Solved] How to Save X Y Position Object in Variable and in Array by AS3?


Try to improve your question.

Is that what you 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 also store your values in a bi-dimensional Array as 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 this case as you have stored two values for posx and posy :

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

You may also check those links to understand the difference between the different kind of types where you may store values :

ActionScript 3 fundamentals: Arrays

ActionScript 3 fundamentals: Associative arrays, maps, and dictionaries

ActionScript 3 fundamentals: Vectors and ByteArrays

10

solved How to Save X Y Position Object in Variable and in Array by AS3?