i am trying to dynamically create 20 movieclips. i want to name them
dynamically, and reference the clip within an array. is this the best way to
go about it? will this even work?...
// array to hold dynamically created movieclips within
myItems = new Array();
// add a movie clip
function addMenuElement(myName:String) {
var myName:MovieClip = _root.createEmptyMovieClip(myName, 0);
myItems.push(myName);
};
// all movieclips are named according myMC and a number
myName = "myMC";
// create 20 movieclips
for(var x:Number = 0; x < 20; x++) {
y = "menu" + x.toString() + "_mc";
myName = y;
trace(myName);
}
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com