FORUMS: list search recent posts

nextFrame prevFrame function

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Michael Wilfong
nextFrame prevFrame function
on Jun 15, 2009 at 4:52:39 pm

I am looking for a way to advance a Flash presentation by using the right and left arrow keys (or with a remote control for projection). I'm assuming I need a key listener, but I cannot seem to get the code to work correctly.

Basically, the code needs to make the flash movie advance to next frame/previous frame on press of the left/right key.

Any help would be greatly appreciated.

Thanks in advance.

Michael W.


Return to posts index

demetri tashie
Re: nextFrame prevFrame function
on Jun 15, 2009 at 7:48:57 pm

here's simple code that will do that - basically you add the event listenr to the stage to hear the keyboard event:
stop();

stage.addEventListener(KeyboardEvent.KEY_DOWN, myFunction);

function myFunction(event:KeyboardEvent):void {

if (event.keyCode==Keyboard.LEFT) {prevFrame() }
if (event.keyCode==Keyboard.RIGHT) {nextFrame() }
}



Return to posts index

Michael Wilfong
Re: nextFrame prevFrame function
on Jun 15, 2009 at 10:04:09 pm

Thanks soooo much for you help...we got it workin' and couldn't be happier...thanks again!
Michael


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]