www.webdeveloper.com
Results 1 to 6 of 6

Thread: closing window from the Flash

  1. #1
    Join Date
    Feb 2003
    Posts
    20

    closing window from the Flash

    How can I close the browser's window from the Flash movie?

    thanks

  2. #2
    Join Date
    May 2003
    Location
    Down Under
    Posts
    4
    You can close the browsers window that holds the flash movie simply by - on your button event in flash (or on the timeline) apply this action.

    on (release) {
    getURL("javascript:self.close()");
    }

    You do not need to have a <script> tag in your html file, that line of javascript works by itself because it is a predefined event handler in javascript. If you wanted to close the window from a certain point based off of the timeline rather than a button, you would just obviously not need the on(release) event.
    FrequeNC
    www.theartofevolution.com

  3. #3
    Join Date
    Jun 2003
    Posts
    16
    agree
    Amazing Graphic Editor - Powerful and easy-to-use graphic editor and converter!
    Silver Eagle Software, Inc.
    http://www.SilverEagleSoft.com


  4. #4
    Join Date
    Dec 2005
    Posts
    1

    Unhappy Close browser window

    I had tried this script, on my flash movie (in a browser window) and wanted to close the window itself, I failed to get the browser window to close. Why is it so?

    on (release) {
    getURL("javascript:self.close()");
    }

  5. #5
    Join Date
    Nov 2005
    Location
    on earth
    Posts
    45
    it doesn't work for me either.
    my neck is red and my grass is blue.

  6. #6
    Join Date
    Oct 2005
    Posts
    26
    Try window.close()
    or write a script.js file, linked to in your html file which contains the
    function close_window(){
    window.close();
    }
    In Flash call getURL('close_window());

    Chris Coppenbarger
    http://www50.brinkster.com/cjcomm
    http://cjcomm.blogspot.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles