Forum Moderators: open
getURL("http://www.myfirstsite.com/", "_blank");
In IE, everything works as expected; a new browser window opens up and goes to www.myfirstsite.com. But in FireFox (tested on 1.5.0.12 and 2.0.0.4) the popup blocker blocks the new browser window from opening.
I've read that this is 'normal' behavior, but I'm wondering how some swfs, like an embedded YouTube movie, are able to open a new browser window without a problem (for instance when you click on the player embedded on another site).
Thanks in advance for the help, and I'm very new to Flash, so don't assume I haven't done something silly :)
[edited by: Captaffy at 6:42 am (utc) on June 23, 2007]
Embed your java for handling the popup on the same page as you are embedding the Flash. Where you host the swf is immaterial.
On your html page within the head tags place this javascript (set the width and height to what you need)-
<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=430,height=550');");
}
</script>
on your button place the actionscript -
on(release){
getURL("Javascript: popUp("urltopopup.html");
}