Dynamic Array populating


i need load images , fill 5 arrays dynamically. part of interest how reference array string variable (arrname.. headshots_thumbs, kids_thumbs, maternity_thumb etc...)

this line wrote supposed reference arrays correctly.

movieclip(_root[arrname]).push(_mc);


[b[in onload function try replacing:
var arrname:string = folder+"_thumbs";

with this:
arrname = this[folder+"_thumbs"];

that should work, , remember change variable declaration:
var arrimages:movieclip = new array();
to:
var arrimages:array = new array();


More discussions in ActionScript 1 and 2


adobe

Comments