Using Objects in ActionScript > Adding parameters to dynamically created movie clips |
![]() ![]() ![]() |
Adding parameters to dynamically created movie clips
When you create or duplicate a movie dynamically using the MovieClip.attachMovie
and MovieClip.duplicateMovie
methods, you can populate the movie clip with parameters from another object. The initObject
parameter of the attachMovie
and duplicateMove
methods allows dynamically created movie clips to receive clip parameters. The initObject
parameter is optional.
For more information, see MovieClip.attachMovie
and
MovieClip.duplicateMovieClip
in the ActionScript Dictionary.
To populate a dynamically created movie clip with parameters from a specified object:
![]() |
Use the following syntax with the attachMovie method: |
|
|
![]() |
Use the following syntax with the duplicateMovie method: |
|
|
The parameter |
![]() ![]() ![]() |