I am currently trying to create a piece of code that will retrieve values from a 2D array and use them as x and y values to position instances of a MovieClip called mcMain. The code for the array will look something like this…
var lvlMain:Array = new Array();
lvlMain.push(new Array());
var xAxis:Array = new Array([150,400,200,300,100]);
var yAxis:Array = new Array([100,200,300,400,500]);
… with both the xAxis and yAxis storing the coordinates for the instances of mcMain.
Im a bit stuck on how to create a piece of code that would retrieve the x and y coordinates listed in the arrays and use them to create instances of mcMain. So going from the code above it would create the first instance at x=150 and y=100, second instance…fifth instance at x=100 and y=500.
Its probably pretty simple but hey, im a simple programmer
So pleeaaaaase let me know how to do it if youve got the knowledge