Skip to main content
February 21, 2008
Answered

Exit button

  • February 21, 2008
  • 4 replies
  • 450 views
Is there a way to have a button exit the flash window instead of the user having to go up and click the red X to do so?

Thank you much
This topic has been closed for replies.
Correct answer Damon Edwards
fscommand("quit") will close a projector. Closing a standalone swf playing in Flash Player (meaning on your desktop), isn't possible. If its in a browser make a call to Javascript to close the browser window.

4 replies

February 21, 2008
ok, I can use a projector file just as well as a .swf so that would work, so the script I used in the first frame of a layer called actions, looks like this:

button_mc.onRelease = function() {
fscommand ("quit")
};

Worked great, thanks!
Damon Edwards
Damon EdwardsCorrect answer
Inspiring
February 21, 2008
fscommand("quit") will close a projector. Closing a standalone swf playing in Flash Player (meaning on your desktop), isn't possible. If its in a browser make a call to Javascript to close the browser window.
February 21, 2008
My flash file is going to just be a .swf file in its own window, so I want the user to be able to click a button to close it instead of the Red X in the top right hand corner.
Damon Edwards
Inspiring
February 21, 2008
what do you mean, like close the browser?