flash actionscript:
Hello,
I have a question concerning the way some javaScript is executed with the new
flash 8 player using firefox as the browser. I have an all flash site and
there is a button that is scripted to open a new browser window and then center
it and load an html page into it with another flash file. What happens in
firefox is that when the button is released, the new window opens down and to
the right, entirely off of the monitor or just shy of off. In IE it opens in
the upper left corner, then fills the monitor as designed.
I'm not sure what exactly to post here as far as script goes, but here is the
actionScript I use on the button in flash:
on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = "
http://www.unseenproductions.net/velvet.html"; target_winName = "Velvet";
width = 10;
height = 10;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 1;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location,
directories, status, menubar, scrollbars, resizable);
}
In addition, there is a frame action which defines the function that is called
upon to execute the javaScript which works together with the actionScript on
the button:
Movieclip.prototype.openWinCentre = function
(url, winName, w, h, toolbar, location, directories, status, menubar,
scrollbars, resizable)
{ getURL ("javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open
('" + url + "','" + winName + "','" + "width=" + w + ",height=" + h +
",toolbar=" + toolbar + ",location=" + location + ",directories=" + directories
+ ",status=" + status + ",menubar=" + menubar + ",scrollbars=" + scrollbars +
",resizable=" + resizable + ",top='+((screen.height/1)-(" + h/1 +
"))+',left='+((screen.width/1)-(" + w/1 + "))+'" +
"')}else{myWin.focus();};void(0);");
}
If anyone could help me resolve this by providing a corrected version of this
script that will work using firefox OR a new script that will allow me to open
a customized window that is centered and works out of flash 8 in firefox, I
would be most appreciative! Thanks in advance,
Alexander