Moving MovieClips in AS3

Discussion

All this new functionality is a lot to take in at the moment, but I noticed something new about the DisplayObjectContainer class (which is inherited by MovieClip). In particular the addChild and removeChild methods which replace the traditional attachMovie.

Does this mean that you can remove a movie clip from one target and place it in another without losing the MovieClip's state?

Theres lots of cool new stuff, and not enough time outside of work to look at it all!

This entry was posted on Wednesday, October 19th, 2005 at 2:00 pm and is filed under Discussion. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

7 Responses to “Moving MovieClips in AS3”

  1. darron Says:

    Yes, addChild and removeChild let you do reparenting of content without modifying the content.

  2. franto Says:

    Does this means, that I load external swf with MCs library, and I can attach movie to different MC, to which is not external swf loaded? This I want for ages :) Am I right?

  3. Ash Says:

    Yep, I think so. I know its only a small thing but I'm finding out that all those little things I wished the flash player could do are being fulfilled. Pretty soon I won't have anything to complain about :(

  4. Keith Peters Says:

    Yeah, re-parenting is one of the most powerful changes in the new DOM.

  5. william Says:

    Mmm re-parenting looks usefull

  6. steven Says:

    aha, re-parenting is must !

  7. timbo Says:

    I have been using re-parenting quite a bit for my projects and ever since it has been very useful

Leave a Reply