Your Ad Here

December 30, 2009

Exit Button In Flash

Reactions: 
Name : Creating Exit Button for swf Movies in Macromedia Flash
Category: Intermediate

Actionscript: 2.0

In this tutorial related to Macromedia Flash you will learn how to create an exit button for a flash movie. There are more than one scripts for exit button but this one is the best and works very fine then other scripts.

1- Open up Macromedia Flash and create a new file.

2- Create a button.

3- While the button is still selected open up the Actions Panel (Ctrl + F1) and write the actions as follows:

on (press) {
fscommand("quit");
}

4- All done. Export the movie clip in .swf or .exe format and check with the file created.

22 comments:

  1. nice. it worked. thanks

    ReplyDelete
  2. does not work on testing movie, but on stand alone swf works fine, thanks a lot

    ReplyDelete
  3. Usually fscommands doesnot work while testing in adobe flash environment. Like fullscreen command.

    ReplyDelete
  4. works in swf but doesn't work when published in html. anyone know why this would be? im stumped

    ReplyDelete
  5. it works.. very useful.. tanx a lot for sharing

    ReplyDelete
  6. how to make exit button in flash game, action scrip 2.0...
    please .....
    any advice..... thanks..

    ReplyDelete
    Replies
    1. scroll up
      theres ure advice

      Delete
  7. thnx buddy, i just forgot the command

    ReplyDelete
  8. It doesnt work. T__T

    ReplyDelete
  9. how to make exit button in flash AS 2.0 ... when user click the button it will poup "yes or no".. if yes then it close the application and if no it will stay on the page.. can anyone help me??

    ReplyDelete
    Replies
    1. This will help. First is you must have a button Close or Exit that links to the other page that has a prompt. then you must have a variable that records the visits or the page that you have been and then put some condition that if (visit == this_page) gotoAndStop (frame of current page or frame) this is for button YES. While in button NO. put some code in button NO that states fscommand("quit"). thats it.. i hope this will help you ;

      ;

      Delete
  10. thank you very much

    ReplyDelete
  11. it doesnt work for me dont know why

    ReplyDelete
  12. How to make the same code work for AS 3.0?

    ReplyDelete
  13. It wont work for you if use use ACtion script 3.0 (this code is for action script 2.0)

    ReplyDelete
  14. You need to exit the Flash program and then try it on swf file on the folder that u save this flash program (press ctrl+enter before so it will export to swf)

    ReplyDelete
  15. Excelllent! Worked perfectly! Thank you !

    ReplyDelete
  16. hey guys isn't the exit button will close the entire flash movie ? Urgent help me plz ...

    ReplyDelete

Please use sensible language.....!