Skip to content

navigateToWindow() is a package-level ActionScript function that encapsulates the logic around opening a browser popup window

License

Notifications You must be signed in to change notification settings

alimills/navigatetowindow

Repository files navigation

navigateToWindow()

navigateToWindow() is a package-level ActionScript function that encapsulates all of the logic around opening a browser popup window from within Flash.

The function works very similarly to navigateToURL except that you call it with the parameters that JavaScript’s window.open might expect.

The test/patternpark/net/NavigateToWindowTest.as file demonstrates how you might use navigateToWindow(). This project was build with Project Sprouts. To run the test suite, install Sprouts and then run ‘rake html’ from the location where you pulled this project down.

One of the unique and interesting features of this implementation is that the developer using it doesn’t have to write any JavaScript. Using a method derived from the ideas of Abdul Qabiz and his post A MXML component that embeds JavaScript in html, Doug McCune and his post Multi-line strings in Actionscript 3, and Jordan Ambra and his post Popups Blocked in AS3 with navigateToURL() we are able to execute all necessary JavaScript directly from ActionScript.

For background on this project, you can check out my old post Workaround for Safari Blocking Flash Initiated Pop Ups.

For another interesting project that solves this same problem through a JavaScript file and an ActionScript file, check out Matt Lohkampl’s popupfromflash.

About

navigateToWindow() is a package-level ActionScript function that encapsulates the logic around opening a browser popup window

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published