> > 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 Actions > OnClick. Type in the link and select “_blank” target:

On Click get url

text link

To control pop-up window position and size



Define JavaScript function in HTML page, in HEAD section:

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

Call JavaScript function in Flash using OnClick action:


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.

Onclick action url

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="'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]

get flash