Tally List : mailing list management, archiving, and analysis
click for archive home
 
Archive of:
Flash
Macromedia Flash List
 
home
24 hour view
quick stats
weekly updates
 
all tallylists
corporate solutions
archive your favorite
help / feedback


Search the Tallylist search by keyword:

About Flash :
product's home
product's list home
 
  Archived TallyList / Flash: 
Subject: Re: Question about populating an Array 2
Paul Willoughby (102p/+0r)     Posted: Friday 11 May 2001
This post: 50 views, +0 rating

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


Similar Subject Line Posts (+/- two weeks of this post)
Re: Question about populating an Array 2  11 May 2001 (this post)   (50 v/ +0 r)
Question about populating an Array 2  10 May 2001   (29 v/ +0 r)
 

Send a reply to the Flash list!
click to send a reply! NOTE: Many lists will reject your post unless you have already registered with them. Also - don't forget the right account to send from (for those with multiple emails!)

Feedback: If this post was exceptionally helpful, please help by giving this post a positive review.

 

TallyList : copyright Ububik - 2000