A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: how do I close an HTML page with a button

  1. #1
    Member
    Join Date
    Apr 2002
    Posts
    42
    the flash animation is embedded in an html page. What code would I put in the button to close that new pop up page?

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    266
    Hi,

    Use:

    Code:
    on (release){
    
    getUrl("JavaScript:window.close();");
    
    }
    Dan.

  3. #3
    Member
    Join Date
    Apr 2002
    Posts
    42
    That worked but... is there any way to not give you the warning of closing the page?

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    266

    Yes, but...

    Hi,

    You cannot get rid of the warning if the window is a main or parent window.

    If you apply the window.close() method to a popup window that has been opened by another window, then the warning will not appear.

    Dan.

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