> > Tutorials > T1022

How to close browser window from a Flash file without prompt.

Example Popup

Note: Flash Player 8 will give a security warning. Use FSCommand method.

Note: Chrome and Firefox can close only previously opened window. They can not close the main browser window.

Call JavaScript function in Flash using OnClick action:


You can also use:


but the browser will prompt to confirm.

Creating "Close" button

  1. Choose "Insert" > "Symbol" command
  2. Choose the following symbol from "Wingding" list:

  3. Choose "Action" > "OnClick"
  4. Choose "Get URL" action and enter the code:


    Click OK

  5. Choose "Action" > "On Over Color", uncheck "No Color" and select your favorite color, click OK

Products | Purchase | Downloads | Support | Flash Tutorials | Contact
Copyright © 1999-2017 Selteco Software, Inc., ph: +1 810 377 5778