1 Reply Latest reply on Dec 15, 2009 6:00 AM by DazFaz

    Need Help with Random Events in Actionscript 2

    JoeBuehrer

      I'm working on a game in flash right now, written in actionscript 2, where bottles fall from above at random speeds, and the object is to shoot the bottles as they fall, and every time you hit a bottle a different message appears on the screen for a brief period of time before disappearing.  So far I'm able to make the bottles fall and I'm able to shoot and break them, but I don't know how to work it so a different message appears each time you shoot a bottle. 

       

      Can anyone help me with this problem?  I'm attaching the file of what I have so far.

        • 1. Re: Need Help with Random Events in Actionscript 2
          DazFaz Level 1

          My first question would be, when you say "different message appears" each time you hit a bottle.

           

          What are the messages and do you want them to be random, and where will they appear.

           

          After looking at your code, the best place I can see to place your message trigger is within the hit test. From there its a somple case of calling a function to display your message.