3 Replies Latest reply on Sep 1, 2007 6:35 AM by clbeech

    Stopping all scripts?

    Penb0y Level 1
      Hi, this is my first post here ^-^
      I've currently made a game which involves shooting flying toasters out of the sky. I have a menu key which takes you to the menu. The problem is, when I go back to the menu my script is still running. Meaning that toasters are flying everywhere! Is there a script that will stop ALL scripts?
        • 1. Re: Stopping all scripts?
          kglad Adobe Community Professional & MVP
          • 2. Re: Stopping all scripts?
            Penb0y Level 1
            What about removing all movieclips on stage?
            • 3. Re: Stopping all scripts?
              clbeech Level 3
              well, you could loop though the contents to do either I suppose, but you'll have to be careful about scope. If you remove all the MCs from the Stage, that would include the menus, and other elements you wouldn't want removed. If you are tracking the instances of the toasters and other gameworld elements, like by storing them in an array, you could do so. or if the game window is it's own MC and the game elements are being attached to it you could stop everything within the MC. Say the latter is the case and you have been dynamically attaching toasters to the 'gameboard_mc' you could do something like this: