Wednesday, July 29, 2009

Remove a Flash Movie Clip from the stage AS2

Just some pure flash geekery:

Ok, so removeMovieClip() only works for dynamically created movieclips, but what if you have a bizarre scenario where you want to trash a clip that was created during development?

Easy as pie:

Assuming "myMovie" is what you want deleted:

myMovieClip.swapDepths(_root.getNextHighestDepth());
myMovieClip.removeMovieClip();

8 comments:

  1. Great, just what I needed! :)

    ReplyDelete
  2. It doesn't work, sorry.

    ReplyDelete
  3. Thank you, worked like a charme!

    ReplyDelete
  4. Thank you... so simple, and perfect.

    ReplyDelete
  5. Thank you so much ... this really helped

    ReplyDelete
  6. I get it! You're making it faux-dynamically created so that we can remove it without actually dynamically created. At least, I think I get it.

    Worked either way. Thanks!

    ReplyDelete
  7. This is simply super stuff

    ReplyDelete
  8. Thank youuu!

    Was super useful! :DD

    ReplyDelete