I have a movieclip that I need to duplicate dynamically based on an outside variable.
e.g. clip1, clip2, etc
This variable changes so I can’t hardcode the number of times it occurs.
Is there a way to dynamically create this movieclip multiple times and align it according on the screen?
I wasn’t able to find anything on Google..
Regards
Luben
How about using a function that duplicates a DisplayObject. This function returns a new instance of the Class the provided object is:
(MovieClip, Sprite, and Bitmap all inherit from DisplayObject)
Edit:
If you need to use it with MovieClips, you can simply: