|
|
Flash dodge ball game part 6 killing counterIn this tutorial we will add a counter to our flash game, to tell us how many lifes we have left and control when then game is over (when we have 0 lifes left). 1. 2. 3. In frame 1 go to the actionscript panel and type in stop(); do the same at frame 2. 4. select the ball we made in the last lesson, and go to the actionscript panel, again we will use the hit test to determinate if the ball has hit our character, so type in the following. if (hitTest(_root.joe)==true) what this does is if the ball hits joe then it will check if the life counter is more then 0 life left, if that is true then subtract 1 life, if life counter is less then 1 then the flash movie will jump to frame 2, where I placed a button called restart. And we are done for this time, you can download the source code here. Part 1 Part 2 Part 3 Part 4 Part 5 Part 6 Part 7 |




