| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Feb 2006
Posts: 6
|
Hello all...
I am creating a presentation out of flash, and I need to set this up like a next slide type of thing, and I don't want to add a button to attach an action to tell it to go to a new swf file, wondering how I can program it so someone can sit at the computer and just hit the left and right arrow keys to advance the "slide?" Thanks much! |
|
|
|
|
|
#2 |
|
Super Moderator
Join Date: Jul 2001
Location: NYC
Posts: 10,026
|
If you search the forums you will find some good results, here are a few
http://www.actionscript.org/forums/s...d.php3?t=96795 http://www.actionscript.org/forums/s...d.php3?t=90902
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com cota - www.chadworkman.com | http://shavedplatypus.com occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql) |
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Feb 2006
Posts: 6
|
Thanks. I was messing around and I got this to work--
on(keyPress "<Right>"){ gotoAndPlay('underwriting'); } But how do I make a second right arrow go to say 'test' ?? Also, how do I make it go back if I want? I know you can just do the 'left' but how does it know what frame to go back to? Referring to your links, I am not good with AC so I don't understand the whole listener thing. Sorry for being a bone head! I just want to be able to hit the arrow key left or right to advance or go back. But I don't know how to make it know which frame to go back to. I appreciate it. Oh I am in Flash 8, so I am assuming my AC that I did use that worked is a bit outdated. Last edited by cgustin; 02-21-2006 at 12:31 AM.. |
|
|
|
|
|
#4 |
|
Super Moderator
Join Date: Jul 2001
Location: NYC
Posts: 10,026
|
you add a listener...then write an "if" statement.
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com cota - www.chadworkman.com | http://shavedplatypus.com occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql) |
|
|
|
|
|
#5 |
|
Registered User
Join Date: Feb 2006
Posts: 6
|
I am sorry, I have never done this before so I am not sure how to go about it, can you elaborate for me? I appreciate it very much!
|
|
|
|
|
|
#6 |
|
Registered User
Join Date: Feb 2006
Posts: 6
|
I saw someone else's post, so I added this to the actions
keyObj = new Object(); keyObj.onKeyDown = function() { if(Key.getCode() == 32) { // space bar goForward(); } else if(Key.getCode() == 39) { // right arrow goForward(); } else if(Key.getCode() == 37) { // left arrow goBackward(); } }; I am getting an error of this: **Error** Symbol=mc_contentBackgnd, layer=fake button2, frame=1:Line 1: Statement must appear within on handler keyObj = new Object(); **Error** Symbol=mc_contentBackgnd, layer=fake button2, frame=1:Line 2: Statement must appear within on handler keyObj.onKeyDown = function() { Shouldn't this part of the code work??? |
|
|
|
|
|
#7 |
|
Registered User
Join Date: Feb 2006
Posts: 6
|
Can anyone out there help me? I have a deadline approaching and not sure how to complete this action. Thanks so much!
|
|
|
|
|
|
#8 |
|
Super Moderator
Join Date: Jul 2001
Location: NYC
Posts: 10,026
|
ActionScript Code:
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com cota - www.chadworkman.com | http://shavedplatypus.com occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql) |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Feb 2006
Posts: 6
|
Wow that was quick. Thanks so much!
|
|
|
|
|
|
#10 |
|
I'm an alright guy
Join Date: Jun 2005
Location: I live where my rump rests
Posts: 292
|
I'm working with Flash Lite 1.0 and im trying to access a key event from a phone or PDA, it seems that Flash Lite is a form of Flash 4. When I try using listeners it comes up with errors. Has anyone here dealt with this before? any info or point in the right direction would be appreciated.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Only one sound at a time! (on button press) | Hibba | ActionScript 2.0 | 2 | 11-27-2005 01:05 AM |
| Recoginizing Key Press Problem | agraddy | ActionScript 2.0 | 2 | 07-25-2005 07:02 PM |
| on press start drag, on press stop drag. how? | alapimba | ActionScript 1.0 (and below) | 1 | 06-17-2005 04:23 PM |
| Dragable button for array of objects? | Crosz | ActionScript 2.0 | 0 | 01-05-2005 05:09 PM |
| When I press tab on a form..... | G-Rard B | Other Flash General Questions | 4 | 11-15-2004 08:00 PM |