I designed a flash slide show on AS2, I want to navigate throw the slides with keyboard keys left and right (back and forth).
I appreciate your advice,
Regards,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Why are you using actionscript 2 and not 3. Just currious. To answer your question You will need to use the key listeners.
I found this example
on this page
http://www.actionscript.org/forums/showthread.php3?t=97523. How it would work is every time you press the right arrow key the gotoAndPlay function would be called. If you just want to go to a particular image and stop then you could use gotoAndStop. This would go to a particular frame and stop. Then you could click the right arrow again to go onto the next image in the gallery.
The keyPress method in the particular format showed above needs to be run in onEnterFrame.
To setup the OnEnterFrame function you need a listener. You could declare this in your constructor.
This is the On Enter frame if you put your keyPress in here every time a key is pressed this method will be run.
public function onEnterFrame(event:Event):void {
I hope the code segments have been helpful and I have explained the various components in an easy way to follow. If you require further assistance please leave a comment so I can make changes
I found this for creating a slide show
http://www.youtube.com/watch?v=I_BYMYgz6Qk