Need help! I’m new to flashpunk and as3. I’m going through the tutorial and I just finished “Keyboard & Mouse Input”. Before I move on, I want to get the spaceship to fire bullets. Already made a Bullet class that extends Entity. I got the bullet picture spawning at my ships location when I fire, but the bullet will not travel up the screen. Also, I’m having trouble with arrays in As3. I made the length 10, but when I fire I can spawn as many bullets as many times I press the fire button. Please help! I’m familiar with Java, but as3 syntax and updating an object’s location in as3 is really messing me up.
Thanks in advance!
Image links are below.
Gameplay:
what is shown when the fire button is pressed. the ship can move left and right
Main class:
*http://i.imgur.com/nUyfVSN.png?1
MyWorld class:
*http://i.imgur.com/mFwWJn1.png
Player class (next 2 images):
*http://i.imgur.com/gbDnUmm.png part 1
*http://i.imgur.com/nTPn5tm.png part 2
Bullet class: