Posted by sortofme on March 6th, 2008
How annoying! You have your flash application, make a normal external link (a good old www basic), and then the browsers block your external link!, well there seems to be a work around:
Actionscript:
-
function getURL(url:String,window:String="_blank"):void{
-
var broswer:String=ExternalInterface.call("function getBrowser(){return navigator.userAgent}") as String;
-
if(broswer.indexOf("Firefox")!=-1 || broswer.indexOf("MSIE 7.0")!=-1){
-
ExternalInterface.call('window.open("'+url+'","'+window+'")');
-
}else{
-
navigateToURL(new URLRequest(url),window);
-
}
-
}
and the most important is set the wmode property is opaque or transparent.
courtesy of:
http://www.riaidea.com/article.asp?id=27(chinese Blog)
Somehow getURL() survived the AS3 code cull, an interesting approach to make it reusable can be found here on Steven Sacks blog. cheers for that one. Would be interesting to combine them to one. TODO:)
Recent Comments