I’m trying to store the initial X position of five movieClips in an Array by looping through it. Should be no worries, but I only end up with “Undefined” when I trace the array afterwards…
// how many menu items
var numMenuItems:Number = 5;
// create two arrays which will hold information
var navStatus:Array = new Array(numMenuItems);
var ballX:Array = new Array(numMenuItems);
// put data in arrays
for(var i:Number = 0; i < numMenuItems; i++){
navStatus* = "closed";
var clip = ((i+1)+"_mc");
ballX* = this.ball[clip]._x;
}
// check array
trace(ballX);
Ok, it’s the last bit I’m having trouble with. I want to read the X coordinate of the five ball movieClips (ball1_mc, ball2_mc…ball5_mc), and store that number in the BallX array. So I need to get the loop to work so I don’t have to type this in manually…
…any help at all would be great.
thansk guys