So I have 2 MovieClips named TreeTop(instance = “treeTop1”) and TreeBottom(instance = “treeBottom1”)
The action script for theyre load assembles them into looking like a single tree
So anyway Im trying to run this code in one of my frames
numTrees=10;
for (i=2; i<=numTrees; i++){
treeBottom1.duplicateMovieClip( "treeBottom"+i, i+100 );
treeTop1.duplicateMovieClip( "treeTop"+i, i+50 );
trace(i)
}
and if i have them normally in the movie it works fine and places randomly generated trees all over the screen
However i need to encapsulate them in a MovieClip so I can Manipulate all the trees together as a single object
and as soon as i put them into the movie clip they will run theyre own constructors(makes sense) but the duplicatemovieclip code doesnt duplicate them
the movie clip Ive encompassed them in is instance named “TOP_LAYER”
Im guessing im just missing something fairly easy …but how can i get the trees to duplicate in the MC?
[edit] I tried changing
treeBottom1.duplicateMovieClip( “treeBottom”+i, i+100 );
treeTop1.duplicateMovieClip( “treeTop”+i, i+50 );
to
_root.[“TOP_LAYER”].treeBottom1.duplicateMovieClip( “treeBottom”+i, i+100 );
_root[“Top_Layer”].treeTop1.duplicateMovieClip( “treeTop”+i, i+50 );
unfortunatly that didnt work…