Hi there,
I’m getting really frustrated with writing code to accurately move forward 1 frame or backwards 1 frame depending on hitting the Up or Down keys… I’ve used a Listener with minimal success.
I’ve managed to get it to progress and regress but if i return to the first frame from any prev. frame, things get wicked screwy and the file progresses out of order. Upon returning to frame 1, it will jump to odd numbers, then every 3rd number maybe… Its jacked up.
I want to be able to go back to the first frame and continue again WITHOUT it altering the order/# of frames/whatever the heck its doing.
Any help would be greatly appreciated!
My crappy code:
function gotoNextSlide() {
nextFrame();
}
function gotoPreviousSlide() {
prevFrame();
}
var myListener:Object = new Object();
myListener.onKeyDown = function() {
if (Key.getCode() == Key.DOWN) {
gotoNextSlide();
} else if (Key.getCode() == Key.UP) {
gotoPreviousSlide();
}
};
Key.addListener(myListener);