A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [AS3] duplicateMovieClip function

  1. #1
    Developer
    Join Date
    Apr 2007
    Location
    UK
    Posts
    324

    [AS3] duplicateMovieClip function

    Im currently creating a map editor for a game Im creating which is going very well

    What would help though is a function which works in the same way as duplicateMovieClip. I can copy single Sprites fine, but if I have for example created a new Sprite which contains two different Sprites, I cant make a copy of that new Sprite. Has any one found on their blog reading travels a function/class which truly emulates duplicateMovieClip?

  2. #2
    Developer
    Join Date
    Apr 2007
    Location
    UK
    Posts
    324

  3. #3
    Wait- what now? tidenburg's Avatar
    Join Date
    Dec 2005
    Posts
    1,471
    Um. Just a guess because I haven't even typed a line of AS3 yet.
    Couldn't you just copy the var you defined as the movieclip and then add that as a child?

    May be completely wrong.
    "I'd only told them the truth. Was that so selfish? Our integrity sells for so little, but it is all we really have. It is the very last inch of us, but within that inch, we are free."

  4. #4
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    I dont know real way to duplicate Movie Clips. You could create copy of variables, methods etc using byteArray, the display graphics could be copied using bitmapData and draw, but I am not sure how to copy the timeline in movie clip.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center