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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Activate the Escape button

Status
Not open for further replies.

Zeroanarchy

Technical User
Jun 11, 2001
630
AU
I have built a flash presentation that will be used as a splash screen, does anyone know of a way of activating the escape key so if the user presses escape it will exit the presentation.

thanks
Zero Anarchy
 
it would be something like this:

on (press, keyPress &quot;<Esc>&quot;) {
fscommand (&quot;quit&quot;);
}

unfortunatly you can't use the escape key in flash it registers as invalid key code..you will have to pick another key to execute the &quot;quit&quot; command..something like:

on (press, keyPress &quot;<WHICH_EVER_ONE_YOU_CHOOSE>&quot;) {
fscommand (&quot;quit&quot;);
}

maybe old can find out which keys flash supports for ya and you pick one that works best..i looked but could not find a list..
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
Did come across this problem before! And if I recall well (I could be wrong!), there's a way to activate the escape key.
My question would be... Is this for a local use (and/or through a projector file) or is this for the web?

Regards,
new.gif
 
the flash presentation is being run in conjuction with VB
as follows

Flash Screen.exe
On exit
run access app.mde

as you can see it is a standalone and has othing to do with a web browser.

Hope this explains what it is I am trying to do.

Thanks Zero Anarchy
 
Based on your first post... How am I to guess this is for a standalone?
Anyways, I know nothing about VB scripting! And openly admit it!

All I can say, is that if I use the following in a control movie clip, in a test .swf:

onClipEvent (enterFrame) {
if (Key.isDown(27)) {
fscommand (&quot;quit&quot;);
}
}

...The .swf closes, on a press of the escape key. A projector file should do the same!

Please note that this doesn't work while testing in the Flash application itself, but works fine when testing the movie on it's own.

Regards,
new.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top