;

PDA

Click to See Complete Forum and Search --> : help me with duplicating movie clips


ymxbc
04-23-2006, 10:50 PM
I need help with creating multiple copies(3) of a movie clip. here's the actionscript i use to make one copy of it:

mc3.duplicateMovieClip("newclip"+3,level);

// set a random position
_root["newclip"+level]._x = int(Math.random()*550);
_root["newclip"+level]._y = int(Math.random()*400);

// increase level
level++;
}

blanius
04-23-2006, 11:21 PM
mc3.duplicateMovieClip("newclip"+3,level);

Not sure it matters. but aren't you nameing them all the same?
try
mc3.duplicateMovieClip("newclip"+level.toString(),level);

Also instead of level at the end you can use

getNextHighestDepth()

ymxbc
04-25-2006, 07:39 PM
i got it now

Thanks a lot