7 Replies Latest reply on Aug 25, 2010 6:25 PM by Ned Murphy

    A big question: Timers, hiding layers, etc.

    Spaghetee Level 1

      Alright, I know I've been asking a lot of questions lately, and it's because many aspects of flash are confusing to me, but I feel like I'm learning a lot as well. I feel that this is my last question for this game because once I get this down my game will be more or less complete.

       

      Okay. Here is my problem, and I have no idea how to start.

       

      My start menu has a Start, Instructions, and Credits button. I can work out the instructions and credits later but I have a few problems. I know I'm asking for a lot here, but I just don't know where to start so even helpful tidbits would be most appreciated.

       

      Timers

       

      Basically, the main game has timers that spawn enemies flying at you. Here is one of the many timers that I have

       

      enemyTimer += 1;
      if(enemyTimer > 5)
      {
          enemyTimer = 0;
          _root.attachMovie("Enemy", "Enemy"+_root.getNextHighestDepth(), _root.getNextHighestDepth());
      }

       

      and of course I defined enemyTimer and set it to 0 on the function onload part. Powerup timers, other enemy timers, etc. are all essentially the same.

       

      The thing is that (I hid all layers except for the ones necessary to the start menu, but I still have enemies, powerups, and various other things flying across the screen)

       

      I don't know how to be able to stop all timers in the beginning and once the Start button is pressed to begin the timers (enemyTimer +=1;)

       

      Unhiding Layers

       

      (this one should be relatively easy to solve for you guys )

       

      I know how to hide and unhide layers, but I don't know how to make it so that certain layers are revealed at a certain point of the game, or with the click of a mouse, etc.

       

      onMouseDown=function

      {

      ???

      }

       

      It is my understanding that you can hide individual movie clips using boolean variables, but I don't know how to hide entire layers... Is there a way around this or do I have to hide every individual movie clip?

       

      ---------------

      That should be it Thanks for all your help guys, and I really hope that this game turns out nicely

       

      -Spaghetee