AS2 Help Please?
Here is the main code that I am working with:
function onEnterFrame() {
if(alive == true){
background._x -= Speed;
Player._y += gravitypull;
gravitypull += gravity;
if(Key.isDown(Key.UP)){
Player._y -= 10;
gravitypull = maxJump;
}
if(Key.isDown(Key.SPACE)){
_root.player.playeractions.gotoAndPlay(4);
}
Everything above seems to work okay, but here's the thing: when I push (SPACE), it proceeds to go to the animation where the player is shooting; which is frame 4. But I DON'T UNDERSTAND why it STOPS PLAYING at the first frame and gets stuck. It wont continue the animation. When I let go of the button, it goes back to normal, which I want. But when I push it, it doesn't want to play the animation, just the first frame.
Been working on this for a while, even tried event listeners and everything.