| Programming ActionScript 3.0 > Flash Player APIs > Using the External API > About the External API | |||
The External API is the portion of ActionScript that provides a mechanism for communication between ActionScript and code running in an "external application" that is acting as a container for Flash Player (commonly a web browser or stand-alone projector application). In ActionScript 3.0, the functionality of the External API is provided by the ExternalInterface class. In Flash Player versions prior to Flash Player 8, the fscommand() action was used to carry out communication with the container application. The ExternalInterface class is a replacement for fscommand(), and its use is recommended for all communication between JavaScript and ActionScript.
|
NOTE |
|
If you need to use the old |
The ExternalInterface class is a subsystem that lets you easily communicate from ActionScript and Flash Player to JavaScript in an HTML page, or to any desktop application that embeds Flash Player.
The ExternalInterface class is available only under the following conditions:
In all other situations (such as running in a stand-alone player), the ExternalInterface.available property returns false.
From ActionScript, you can call a JavaScript function on the HTML page. The External API offers the following improved functionality compared with fscommand():
fscommand() function.fscommand().|
WARNING |
|
If the name given to the Flash Player instance in an HTML page (the In addition, if the HTML tags that define the Flash Player instance (the |
Flex 2.01