资 源 简 介
This method handles the process of calling a javascript popup using the window.open function from a flash movie (AS3) embedded in a web page - if this fails (due to aggressive popup blocking, e.g. Safari) a normal window is opened, as if a link with target="blank" was clicked.
Here"s how it works:
The .swf uses ExternalInterface.addCallback to create a path back into flash, allowing a window to be opened through normal (navigateToURL) methods.
The .swf uses ExternalInterface.call to run a method of an instance of the PopupFromFlash javascript class on the page that the .swf is embedded in - this function attempts to create a popup using window.open. If it fails, it calls back to the .swf using the path established in the first step.
Optionally, a random seed may be used as a unique title for the new window, forcing most browsers to open the link in a new window every time, rather then re-using previously popped w