In AS2 I could call a javascript pop up function from flash
with the geturl. But it's not working with AS3's navigateToURL.
Here's my code:
var UrlRequest:URLRequest = new
URLRequest("javascript:MM_openBrWindow('
http://www.djgecko.com/mp3/17_ice_hopper.mp3','DJGecko','top='
+ ((screen.availHeight/2)-(200/2)) + ',left=' +
((screen.availWidth/2)-(400/2)) +
',status=yes,resizable=yes,width=400,height=200')");
navigateToURL(UrlRequest);
And here is my javascript code:
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
When I paste the url string in my browser the pop up works.
When I test the swf in the Flash app it opens up a browser window
and tries to run the function, but it of course doesn't work. When
I open the .swf in a browser, embedded in the page with the
javascript function, nothing happens. Can someone help?
Thanks!