dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: trying to remove a movieclip when a movie clip inside it finishes

  1. #1
    Member
    Join Date
    Oct 2009
    Posts
    30

    trying to remove a movieclip when a movie clip inside it finishes

    I'm trying to remove a movieclip when the one inside of it finishes playing. help?
    PHP Code:
    onEnterFrame = function(){
        if (
    baddy.bad_die.currentFrame == baddy.bad_die.totalFrames){
            
    removeMovieClip(baddy);
        }

    Plz don't laugh at how retarded i am.

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    I'm assuming you are using AS 3.0, so the best idea would be to add a listener to the movieclip. Next you should probably call the removeMovieclip from the parent of the child to be removed. If baddy is the child on the main timeline, then you would go something like this:

    PHP Code:
    MovieClip(root).removeMovieClip(baddy); 
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

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