
June 25th, 2012, 08:24 PM
|
|
|
|
ActionScript 3 - Popup AS3 script does not work on Mac Safari browser?
Can anyone see why this script will not work on Mac Safari.
Code:
import flash.net.URLRequest;
myBtn.addEventListener(MouseEvent.CLICK,doClick);
function doClick (e:MouseEvent):void
{
var address:String = "http://www.google.com";
var jscommand:String = "window.open('" + address + "','PopUpWindow','height=600,width=600,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0');";
var url:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);");
navigateToURL(url,"_parent");
}
The swf that contains this script is embedded on the wordpress page as normal so I do not think I have embedded it wrong.
Does anyone have a more reliable script that works on both platforms and all browsers that they could provide.
Thanks
|