Groups | Blog | Home
all groups > flash actionscript > march 2007 >

flash actionscript : How To Close a Browser Window



JuliaO
3/13/2007 9:00:04 PM
Hello,

I'm trying to figure out what I'm missing! I've added a close button to a
Flash Player 8 file that is running in a browser window. When the user clicks
the close button I want the browser window to close. The code on my button that
I've tried is:

getURL("javascript:window.close();");
and
getURL("javascript:window.open('','_parent','');window.close();");
and
getURL("javascript:window.opener=self; window.close()");

None of these will close either a Safari or a Firefox window, but it works in
IE. Am I missing something?

Thanks,


Julia
Ertz P.
3/20/2007 4:14:50 PM
Try this:
on (release) {
getURL("javascript:void(window.opener.location.href='http://www.pontofrio.com.br/cgi-bin/loja.pl?detalhe1=470430');self.close();");
Ertz P.
3/20/2007 4:22:48 PM
Try this action in the buttom:

The pop up with flash will open the site in the opener window and then will
close it self.

This will work good in IE and Firefox.

Ertz P.

on (release) {

getURL("javascript:void(window.opener.location.href='http://www.google.com.br/')
;self.close();");
}
AddThis Social Bookmark Button