Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using the keyboard in a flash movie 1

Status
Not open for further replies.

Nunzio

Technical User
Apr 13, 2001
61
US
Hello everyone,
I would like to know if you can make a flash movie work like a Power Point Presentation in the way that the Backspace and also the space bar advance and go back in the flash movie. can anyone help?

Nunzio If you code it I will crash it.
 
You should just need to add a new layer, which covers all the scenes in the time line, and put some code in it to check if the


my_key = Key.getCode();

if (my_key = <code for back key>) { prevFrame(); }
if (my_key = <code for fwd key>) { nextFrame(); }


The code for space bar is 32 but I'm darned if I can get a key code for backspace (just put a trace(my_key); into the code above, run the movie and then hit keys to find the codes!).

Alternatively, of course, you could use the standard Flash keys which are comma (,) for back a frame and full-stop (.) for forward a frame!

=)

PetitPal.
 
PetitPal,
Thanks sorry it took so long for me to get back to you. But it works great thanks.

Nunzio If you code it I will crash it.
 
PetitPal,
I have a couple of small problems with this agian. Is there any way that you make the flash movie play the animation after each frame. Currently it only goes one frame at a time. also when I exported the movie it didn't keep the standard buttons for next(frame) and Prev(frame) which was (,)for prev(frame) and (.) for next(frame). Is there any possible way that you could help?

Nunzio 10101010101010101010101010100001
If you code it I will crash it.
10101000100101001111000100100010
 
Try double
Code:
==
in the if statements!
Code:
if (my_key == <code for back key>) { prevFrame(); }
if (my_key == <code for fwd key>) { nextFrame(); }

;-)
 
Hi Nunzio,

What do you mean when you say 'play the animation after each frame'?

And, oh yeah, unwanted is absolutely right, there should have been == in my code instead of = ; that's what happens when you write code in browsers!

X-)

PetitPal
 
PetitPal,
Sorry if I wasn't explanitory enough. What I am trying to do is, after each frame play a 20 frame animation or so. When I tried this them movie didn't seem to want to move it was kind of confusing. Any help would be appreciative.

Nunzio 10101010101010101010101010100001
If you code it I will crash it.
10101000100101001111000100100010
 
Nunzio,
What's your coding now?
Or is this uploaded - do you have a link - so that we can better see what you're trying to achieve?

;-)ldnewbie
 
unwanted,
The only coding I have to far is what is above and a stop action at the end of the animation I created. thats about it.

Thanks,
Nathan 10101010101010101010101010100001
If you code it I will crash it.
10101000100101001111000100100010
 
Thanks for all the help. I managed to get something out in time for my meeting.

Thanks
Nunzio 10101010101010101010101010100001
If you code it I will crash it.
10101000100101001111000100100010
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top