PDA

View Full Version : shooting game



alina
September 20th, 2005, 02:25 PM
I've been trying to follow a tutorial for a simple shooting game on http://www.video-animation.com/flash_12.shtml but was unable to get the "bullet" to replicate and shoot while i click. The only thing that happens is it launches one bullet when i test it but nothing else, has anyone else experienced this? I'm pretty sure I followed all the directions and copy/pasted the code into the actions area. Am i supposed to paste the the code to somehting other than the movie clips?

TheCanadian
September 20th, 2005, 06:32 PM
Instead of me guessing can you please post your FLA?

GPP
September 20th, 2005, 08:17 PM
Theres atchully a downloadable fla with the tutorial ;)

TheCanadian
September 20th, 2005, 11:29 PM
If I downloaded the file from the tutorial there would be no problem so i couldn't help him. I want to see his code so I can find what's wrong with it.

alina
September 22nd, 2005, 01:02 PM
oops, yea i probably should've done that, here you go: http://www.geocities.com/testb365/shootything.fla I tried downloading the tutorial and mine looks exactly the same except it doesn't work

Smee
September 22nd, 2005, 04:52 PM
You didn't name the bullet MC. Click on the bullet, and look at the properties panel. Where it says "<Instance Name>", type "bullet".

Then, after that, there's another problem. You didn't declare "bulletNum" in the code on the shooting thing, so it overwrites the old bullet everytime you click. add


bulletNum = 0;

to the onClipEvent(load) function.