[RESOLVED] Sound not playing?
Hi there, in my coding I have this function:
Actionscript Code:
if(!mainJumping){
if(Key.isDown(38) || Key.isDown(87)){
if(!mainOnLadder){
mainJumping = true;
jumpSpeed = jumpSpeedLimit*-1;
mcMain._y += jumpSpeed;
jumpsound = new Sound(this);
jumpsound.attachSound("jump");
jumpsound.start();
}
}
}
and it all worked fine.
Then I added a pause menu, and thus added this in the onEnterFrame function (containing this jump function):
so that everything would only happen when the game isn't paused. As a result the sound won't play... This is the only function I added to the script (well, aside from the actual variable: var gamePaused:Boolean = false). Everything else, including physically jumping, works fine. What's wrong?