A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: is there a code to disable exit button in flash?

  1. #1
    Junior Member
    Join Date
    Mar 2004

    is there a code to disable exit button in flash?

    hey umm i was just wondering if there was a code to disable or delay the exit button in a flash? i am wondering because i remember playing a game that i couldnt exit until the credits had finished and no my comp wasnt lagging?

  2. #2
    all you would have to do is have a button on the stage, give it an instance name of something like exitButton_btn and then on the frame you want the user to be able to click on it and exit put in this code:

    exitButton_btn.onRelease = function(){
          //exit the game code here
    There ya go that should work

  3. #3
    Unknowable Donkey of Spong Crash Raindog's Avatar
    Join Date
    Oct 2002
    Or you could use a var that isn't defined and set to true until the frame where you want to allow the player to exit.

    Test the var on the onRelease handler like so;

    exitButton_btn.onRelease = function(){
    ///exit code here;

    If testVar is true, it will execute the code, if it isn't defined or set to false, it won't.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center