Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The Easiest way to close a popup window in Flash

Useful Tips

The Easiest way to close a popup window in Flash

by  TulsaJeff  Posted    (Edited  )
This is going to seem way too simple but it meets the minimum criteria in that it works well.

Basically create a button ... right-click on the button...select Actions ... double-click on Basic Actions/getURL

In the URL box at the bottom of the actionscript window type the following code:

javascript:window.close()

leave the "window" box blank

select "don't send"


When used in a popup window it will not send an alert that says "Do you really want to close this window?"

On a non-popup window it will send the alert.

It works equally well in either popup windows or regular windows. It also does well in HTML pages by specifying the javascript:window.close() in place of a normal link address.

Please contact me if you have any ?'s

Good Luck!

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top