dcsimg
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: closing broswer from swf

  1. #1
    Member
    Join Date
    Jul 2002
    Location
    israel
    Posts
    35

    closing broswer from swf

    i have swf file running in a browser
    i want to make a button that will close the browser that the swf run's in
    how do i do that?

  2. #2
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    place the following script on your button:

    Code:
    on(release) {
    	getURL("javascript:window.close()");
    }
    hope this helps

    -myk

  3. #3
    Member
    Join Date
    Jul 2002
    Location
    israel
    Posts
    35

    the problem is

    that the window i want to close is inside a frame set
    and it isn't matter if i do:
    getURL("java script:window.close()");
    or
    getURL("java script:window.parent.close()");

    the window isn't closing iand i am getting like the "404 error message window"
    so what else can i do?

  4. #4
    FK's Super Loquacious Randomite ad_mtk2's Avatar
    Join Date
    Jun 2001
    Location
    Calgary, AB Born of bread in Bristol, UK
    Posts
    1,273
    Set this action for the button:
    Code:
    on (release) { 
    getURL ("javascript:window.close()", "_self"); 
    }
    Change the _self to _parent if the you're using a frameset in the pop-up.

  5. #5
    Member
    Join Date
    Jul 2002
    Location
    israel
    Posts
    35

    still isnt working

    even if i use _parent it isnt working

  6. #6
    FK's Super Loquacious Randomite ad_mtk2's Avatar
    Join Date
    Jun 2001
    Location
    Calgary, AB Born of bread in Bristol, UK
    Posts
    1,273
    what version of IE and OS do you have, is it a flash movie that you are closing it from?

  7. #7
    Member
    Join Date
    Jul 2002
    Location
    israel
    Posts
    35

    i am trying to do it from an swf

    that run's in a browser
    i have os :win 98 ,flash mx, explorer 6

  8. #8
    FK's Super Loquacious Randomite ad_mtk2's Avatar
    Join Date
    Jun 2001
    Location
    Calgary, AB Born of bread in Bristol, UK
    Posts
    1,273
    upload your example and i'll make it close for you.

  9. #9
    Member
    Join Date
    Jul 2002
    Location
    israel
    Posts
    35

    i have attatched 3 file

    the fla (flash mx)
    the html
    and the first page called a.html wich inside of it i define the
    frameset
    Attached Files Attached Files

  10. #10
    FK's Super Loquacious Randomite ad_mtk2's Avatar
    Join Date
    Jun 2001
    Location
    Calgary, AB Born of bread in Bristol, UK
    Posts
    1,273
    you'll need to upload the .fla or i can't do anything.

  11. #11
    Member
    Join Date
    Jul 2002
    Location
    israel
    Posts
    35

    here is the file

    if u fix it please attatch the file too
    Attached Files Attached Files

  12. #12
    Member
    Join Date
    Jul 2002
    Location
    israel
    Posts
    35

    here are all the files zipped

    1
    Attached Files Attached Files

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