Nick Velloff wrote: > What works: > > myArray0 = new Array(); > pushed = myArray0.push(pu); > > What I want to work: > > E = 0 > set ("myArray" add e, new Array()); -- I found that this one > does work _but_ > pushed = "myArray" add e.push(pu); -- Does not >
You need to give the scope and add the [] around the dynamic name:
pushed = this["myArray" add e].push(pu);
The 'this' before the [] could be any target path e.g. _root, _parent.mc1 etc. but you do have to give some scope for this syntax to work. You can also initialize the array dynamically using the same sort of syntax:
e = 0; this["myArray" add e] = []; //creates an empty array called 'myArray0'
hth
paul
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Chinwag site carries a wealth of Flash resources. Find useful links, suggested reading and archives at:
** http://www.chinwag.com/flasher ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You are subscribed to flasher as: flash@tallylist.com To unsubscribe, email leave-flasher-479872H@lists.chinwag.com