Helpful Information
 
 
Category: Flash Help
Calling a popup from Flash

Hi,

I've set FScommand, for calling a pop-up window from flash, in flash file, I embed this action in the button,

on (release) {
fscommand ("call_popup", "testpage.htm");
}

and in the html file, i've added,

<SCRIPT LANGUAGE="VBScript">
<!--
// Catch FS Commands in IE, and pass them to the corresponding JavaScript function.

Sub myslash_FSCommand(ByVal command, ByVal args)
call myslash_DoFSCommand(command, args)
end sub

// -->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function myslash_DoFSCommand(command, args) {
if (command == "call_popup") {
window.open(args, 'popMe','directories=0,status=0,menubar=0,toolbar=0,scrollbars=1,resizable=no,copyhistory=no,width=6 30,height=450,top=200,left=200')
}
}
//-->
</SCRIPT>

in IE, it works fine, the window can be pop-up, but in Netscape, no response at all, why?

I wouldn't use a FS command for this, all you need is:

In the head part of your html file add this:

<SCRIPT type="text/javascript" language="JavaScript">
<!--
function newwin(location,name,w,h)
{
var scrw=(screen.width/2)-(w/2);
var scrh=(screen.height/2)-(h/2);
window.open(location,name,'scrollbars,left='+scrw+',top='+scrh+',width='+w+',height='+h);
}
//-->
</SCRIPT>

and call it with a button in flash using:

GetUrl
javascript:newwin(popupfile.htm','hos',300,400)

Good luck

thanks, i can handle it now










privacy (GDPR)