assetArray1:array= new Array();
assetArray1.push(new jump_mc()); // create objects in memory
assetArray1.push(new pool_mc());
assetArray1.push(new curve_mc());
assetArray1.push(new left_mc());
var levelArray:Array= new Array(3,0,1,0,2,2,1,3,0,1,2);
var finalArray:array = new Array();
for (var i:uint=0; i<levelArray.length; i++)
{
var temp:uint=levelArray*;
finalArray.push(assetArray1[temp]);
}
i end up with finalArray storing references to the 4 movie-clips in proper order in which i will be calling them.
example:
when i call finalArray([3]) , it should reference my one instance of jump_mc()
This is not exactly the code i used, i dont have it in front of me at the moment, It did work though.
my question:
- did i over complicate things? i feel like this is redundant a little.
- how can i store properties for each finalArray reference ?
i want to say finalArray[3].myProperty=75;
but i dont want to tie that property directly to the movieClip itself.
thanks