1 Reply Latest reply on Dec 11, 2006 3:37 PM by Rothrock


      ok im having this problem
      i hate puting actions on the frame so is there any way i can edit this code for an infinite looping of enemys into the mc

      the code is

      for(i=1; i<=ec; i++){
        • 1. Re: loops
          Rothrock Level 5
          An infinite amount of enemies sounds like an awful lot! :) And Flash only gives you a couple million depths you can put things on so you will run out long before you get to infinite.

          So I'm not sure exactly what you are trying to do, but maybe something like this.


          function deployEnemy(){


          I've just made that up off the top of my head and haven't tested it. But it should (more or less) deploy however many enemies you want per turn every delay interval (in milliseconds). So as it stands it would deploy 5 enemies every 1/2 second. When you wanted it to stop you would do:


          Also there is that limit on the number of depths. It will take a long time to use them all up, but between Levels or when starting a new life or what have you, you might want to recent the curCount back to zero or something like that.