Navigatetowindow
navigateToWindow() is a package-level ActionScript function that encapsulates the logic around opening a browser popup window
Install / Use
/learn @alimills/NavigatetowindowREADME
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/.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
