A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: how to close browser window from within .swf file?

  1. #1
    Junior Member
    Join Date
    Mar 2000
    Posts
    1

    Post

    I have looked through/searched the Help and still am unable to find anything on how to use a button from within a movie to close both the movie as well as the browser it is playing in.

    I'm guessing its probably very, very simple--and I'm overlooking the obvious.
    Am I right?

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Posts
    174

    Post

    Hi rboyts,

    I've mailed you a script U can use for doing this. Check it out. If you still have problems, feel free to mail
    Shaman

    ------------------
    Shaman@Operamail.com
    <EMBED src="/cgi-bin/ubb/Members/sigs/00000666.swf" quality=high WIDTH=103.5 HEIGHT=60 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED>

  3. #3
    Senior Member
    Join Date
    Mar 2000
    Posts
    174

    Post

    Well I tried... But your email adress isn't valid. I got the email back. I'm sorry but I can't paste the code in my posting because it won't be visible. Bad luck ! Try again

    ------------------
    Shaman@Operamail.com
    <EMBED src="/cgi-bin/ubb/Members/sigs/00000666.swf" quality=high WIDTH=103.5 HEIGHT=60 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED>

  4. #4
    Member
    Join Date
    Feb 2000
    Posts
    34

    Post

    You could make a button with the action:

    On (Release)
    Get URL ("javascript:close()")
    End On

    or

    On (Release)
    Get URL ("javascript:window.close()")
    End On

    One of those should work. If anyone know a better/differnt way, I would be interested.


  5. #5
    Senior Member
    Join Date
    Mar 2000
    Posts
    457

    Wink

    the easiest way is to just copy and past from sites that allready invented the wheel instead of reinventing it on your own
    for example visit: http://www.cybertage.ic24.net/flash/default.htm
    look at the source code and adjust it for your own site :-) also don't forget to make a close window button because they can't close it whith the cross button of the browser. Once again you could take the source code of my (under construction) page: http://www.cybertage.ic24.net/flash/close.htm
    copy that to your own close.htm and put the action get url = close.htm in your flash site close button :-) good luck with it. I learned this from GrandmasterFlash also a member of the flashkit site. It helped me and it should help you too. Bye for now
    Michel Staal
    ICQ: 14898533
    and if you don't want to cut and paste you could always write it yourselve. Use this as an example then :-)

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