-
A little help
Hello everyone. I'm new to AS2 but I'm in the middle of designing a game. I've used the website to get some code; but it doensn't always work and I don't want to bump the thread. I'm using a listener when the Enter key is hit to go to the next frame; but that applies to every frame, not just one.
Code:
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUpHandler);
private function onKeyUpHandler(event : KeyboardEvent) : void
{
switch(event.keyCode)
{
case Keyboard.ENTER:
nextFrame(10);
break;
}
}
and when the animation for a character is done playing, I want to go to the next frame on the timeline; which also doesn't work.
Here's a video; can you tell me what I'm doing wrong.
http://www.youtube.com/watch?v=cPCEY...ature=youtu.be
-
is this for a 'class' or something?
Im not 100% clear on what it is you even want to do?
If you put a listener on the ENTER key.. that says when pressed.. go to next frame.
That what it will do, each time it is pressed. (unless you remove the listener form the ENTER key)
I also do NOT think the nextFrame() function can take any arguments/parameters (ie: the 10 you have in there)