I have a question, I am in the process of creating a flash presentation that I have to intergrate a keyPress left and right, but also have a nav system that if you click on the title it will take you to that frame and play it.
Here is how I have this layed out…
I have set up the main nav as Nav_mc. It contains 20 different titles that have to when pressed gotoAndPlay an animation in the presentation e.i.(areil view, view from 400 etc…)
So, my question is two fold… adding the function to the mc is not a big deal no problem, but I usually use labels when I do this and if I am using a keyPress function Left and Right to go to the the next animation and play it, I am having a little trouble grasping how to set up the key press so that if you pressed it left it would go to the next fram label and play that and vis-versa.
so if I do this…
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDow(Key.LEFT)){
_root.main_mc.gotoAndPlay(“This would plat previous animation”);
}
}
Key.addListener(keyListener);
var keyListener:Object = new Object();keyListener.onKeyDown = function() {
if (Key.isDow(Key.RIGHT)){
_root.main_mc.gotoAndPlay(“This would play the next animation in sequence”);
}
}
Key.addListener(keyListener);
I am now using a label to direct the press of the navagtion to go to that frame and play the animation. I am not sure on how to code the keyPess to have it do the same thing.
any suggestion or is there a better way of differnet way to approach this?
Aaron