Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alimills/navigatetowindow
navigateToWindow() is a package-level ActionScript function that encapsulates the logic around opening a browser popup window
https://github.com/alimills/navigatetowindow
Last synced: 3 months ago
JSON representation
navigateToWindow() is a package-level ActionScript function that encapsulates the logic around opening a browser popup window
- Host: GitHub
- URL: https://github.com/alimills/navigatetowindow
- Owner: alimills
- License: mit
- Created: 2009-04-16T19:17:14.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2010-07-09T19:10:44.000Z (over 14 years ago)
- Last Synced: 2024-08-04T05:05:24.324Z (6 months ago)
- Language: ActionScript
- Homepage:
- Size: 143 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.textile
- License: MIT-LICENSE.txt
Awesome Lists containing this project
- awesome-actionscript-sorted - navigatetowindow - navigateToWindow() is a package-level ActionScript function that encapsulates the logic around opening a browser popup window (Unsorted / Other API)
README
h1. 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()":http://livedocs.adobe.com/flex/3/langref/flash/net/package.html#navigateToURL except that you call it with the parameters that JavaScript's "window.open":https://developer.mozilla.org/En/Window.open might expect.
The "test/patternpark/net/NavigateToWindowTest.as":http://github.com/alimills/navigatetowindow/blob/5d1a72f4033a6e61d06fefe7574329957d8c083d/test/patternpark/net/NavigateToWindowTest.as file demonstrates how you might use navigateToWindow(). This project was build with "Project Sprouts":http://github.com/lukebayes/project-sprouts/tree/master. To run the test suite, install "Sprouts":http://github.com/lukebayes/project-sprouts/tree/master 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":http://www.abdulqabiz.com/blog/ and his post "_A MXML component that embeds JavaScript in html_":http://www.abdulqabiz.com/blog/archives/macromedia_flex/a_mxml_component_tha.php, "Doug McCune":http://dougmccune.com/blog/ and his post "_Multi-line strings in Actionscript 3_":http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/, and "Jordan Ambra":http://www.zorked.com/ and his post "_Popups Blocked in AS3 with navigateToURL()_":http://www.zorked.com/flash/flash-and-navigatetourl-popup-blocking/ we are able to execute all necessary JavaScript directly from ActionScript.
For background on this project, you can check out "my":http://www.asserttrue.com/ old post "_Workaround for Safari Blocking Flash Initiated Pop Ups_":http://www.asserttrue.com/articles/2007/08/22/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":http://code.google.com/p/popupfromflash/.