flash actionscript:
Show us your code? David stiller (at) quip (dot) net "Luck is the residue of good design."
You know how ESC key will exit from a projector, can you make a graphic button that uses that command? The FSCommand "Quit" isn't working for what I'm doing, but hitting the ESC button does. Thank you.
This is what I have: on (release) { fscommand("quit"); } It's on a button that I want to close the program with, it's an swf running in a screensaver. The quit command doesn't work. But hitting ESC on the keyboard does.
Maddug, Well, your code looks all right, so I would aim for some basic trouble shooting. Add a trace() to make sure the button is properly firing at all. on (release) { trace("Quit button was clicked."); } See if you get that message in your Output panel. Maybe you have your code on the wrong button? Maybe the button has a weird hit state? The other thing is, fscommand() mainly works in Projectors, yet you've got something special going on. You said your SWF is "running in a screensaver," so that may be introducing an unforeseen twist. Are you using 3rd party softare to create your screensaver? Most screensavers quit when the mouse moves at all, or when someone touches the keyboard, not when someone clicks on a button, so I'm having a hard time visualizing your project. David stiller (at) quip (dot) net "Luck is the residue of good design."
Hi, I think u want a script such as when u click ESC button on keyboard u will quit from application. If yes than this is the script onClipEvent (keyUp) { if (Key.getCode() == Key.ESCAPE) { fscommand("quit"); } }Q] Regards, Ronak
OK, if I view my SWF, not Projector, and click on my "close" button, it closes the SWF. The screensaver program I'm using is GlobFX's Swiff Saver. It takes SWF files and exports them as .SCR (screen saver file). So when the screen saver is playing I've set it so you can still use the mouse without exiting the saver. You can hit the ESC key on the keyboard and it exits fine, but clicking my "close" button in the movie doesn't work. For some reason it's not passing on the close command from the SWF throught the Screen Saver file.
Don't see what you're looking for? Try a search.
|