|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Naming Instance of DuplicateMovieClip
I want to Duplicate a Movie Clip using AS.
How can I name this new instance of the MC? |
|
#2
|
|||
|
|||
|
ethan -
there's a better way to do it than Duplicate Movie Clip - try this: this.attachMovie(yourInstanceName, yourNewinstanceName, yourDepth); |
|
#3
|
|||
|
|||
|
...but if you did want to use duplicatemovieclip...
this script places the new instance of the duplicated mc on a new level each time and appends the name of each movie clip with that level as a unique identifier. var inc = 0; movietoduplicate.duplicateMovieClip("newname_"+inc, inc); //now access attributes of your new movie: eval("newname_"+inc)._x = 56; eval("newname_"+inc)._y = 90; inc = inc + 1; that should do it. don't forget to increment the x and/or y positions otherwise you won't see them. ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Naming Instance of DuplicateMovieClip |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|