A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: What is the code to EXIT and close a swf?

  1. #1
    Senior Member
    Join Date
    Nov 2006
    Posts
    101

    What is the code to EXIT and close a swf?

    I've got an swf with an 'exit' button and as soon as the user clicks this, I want the whole swf file to close.

    Can someone please help me with what I need to do and the code to write for the button etc.

    Thanks

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    Is it in being shown in your web browser, or in it's own window (projector file)? If it's in a web browser, do you want to close the browser window, or just unload the movie, or...?

  3. #3
    Senior Member
    Join Date
    Nov 2006
    Posts
    101
    It's currently just a swf, which I'm thinking of publishing as a projector.

  4. #4
    Senior Member
    Join Date
    Nov 2006
    Posts
    101
    Im thinking it will be done using the fscommand("quit") as Im doing it as a projector.

    But, when the user clicks on the exit button, I want movieclip to appear as like a validation which confirms whether the user wants to exit. They have yes and no buttons and if they user clicks on Yes, then it exits the overall projector.

    How will the code for this be written, as the fscommand will reside in the movieclips 'yes' button, which is part of the overall swf.

    Do you have to use relative paths or something?

    Thanks

  5. #5
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    fscommand("quit") will close the movie regardless of where it's placed.

  6. #6
    I do not think Flash can do that. You could make it full screen and then place your own exit buttons on top.

  7. #7
    Multimedia Designer
    Join Date
    Jan 2004
    Location
    Edinburgh, Scotland
    Posts
    70
    Hi there.

    I have mocked up what I think you are looking for. Please see the attched fla and let me know if this what you were after.

    All the best,

    James
    Last edited by jamesferguson; 08-06-2008 at 04:38 AM.

  8. #8
    Senior Member
    Join Date
    Nov 2006
    Posts
    101
    Hi James, cheers for the reply.

    Yeh, thats precisely what I'm after. The attached file does not actually quit when I click on the 'quit' button in the dialogue box. Is this supposed to be like this?

    Thanks

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