Selteco Software
Selteco.com > FlashDesignerZONE.com > Tutorials > T1016

How to pop-up a window from a Flash file.

Pop-up regular browser window

Select the item to be the active area and choose Item > Actions > OnClick. Type in the link and select "_blank" target:

Important information about pop-up blockers.

To control pop-up window position and size

Define JavaScript function in HTML page, in HEAD section:

<SCRIPT>
function popupwindow(url,popupname,parameters)
{
	window.open(url,popupname,parameters);
}
</SCRIPT>

Call JavaScript function in Flash using OnClick action:

javascript:popupwindow('t1016a.gif','T1016','height=475,width=600,top=0,left=0,resizable=no,scrollbars=yes');

IMPORTANT: The function will not popup the window in Flash Designer preview mode. You have to export HTML page and define JavaScript function "popupwindow" in the HTML code first so Flash player can refer to it.

Export Flash file ("File" > "Export Flash SWF File") to the same folder where HTML page is placed, and embed Flash animation in HTML using OBJECT and EMBED tags (generate the code with "File" > "View HTML Code" command)

Popup from HTML

Use the same code to popup a window from HTML code:

<A HREF="javascript:popupwindow('t1016a.gif','T1016','height=475,width=600,top=0,left=0,resizable=no,scrollbars=yes');">Popup Window</A>

Popup from HTML [popupwindow() version]

Or use onClick directly

<A HREF="" onClick="window.open('t1016a.gif','T1016','height=475,width=600,top=0,left=0,resizable=no,scrollbars=yes'); return false;">Popup Window</A>

Popup from HTML [onClick() version]