Results 1 to 6 of 6

Thread: Remove All movieclips at once?

  1. #1

    Remove All movieclips at once?

    I have another problem.
    In my game the player goes to gameover when it hits an enemy but the thing is that the enemies are still floating around on the game over screen! (There's loads of enemies)
    I've tried the:
    removeMovieClip("enemy");
    action but it only removes two of them away.

    Please help!

  2. #2
    well if your using duplicateMovieClip you could proboly just do something like
    if(loss==true){
    unloadMovie(['badguy'+i]);
    }
    hope that works for ya if not let me know ill c what else i can think of.

  3. #3
    Still doesn't work

  4. #4
    Code:
    for (var i in myMovieClip) {
    if(typeof(myMovieClip[i]) == "movieclip") {
    myMovieClip[i].swapDepths(myMovieClip._parent.getNextHighestDepth);
    myMovieClip[i].removeMovieClip();
    }
    }

  5. #5
    Lately, I've been in the habit of having all my game objects referenced in one array or another. Just come up with a good scheme for categorizing and organizing your clips, and when you want to remove all the movie clips, you'll just loop through the arrays you need to.
    you = function(){
    setEnabled( true );
    live();
    setEnabled( false );
    }

  6. #6
    thats anaother solve:
    create new mc; container.
    all mc added to that.
    and remove all in one go

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012