Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > ExternalInterface (flash.external.ExternalInterface) | |||
Object
|
+-flash.external.ExternalInterface
public class ExternalInterface
extends Object
The ExternalInterface class is the External API, an application programming interface that enables straightforward communication between ActionScript and the Flash Player container; for example, an HTML page with JavaScript, or a desktop application with Flash Player embedded.
ExternalInterface is similar in functionality to the fscommand(), CallFrame() and CallLabel() methods, but is more flexible and more generally applicable. Use of ExternalInterface is recommended for JavaScript-ActionScript communication.
From ActionScript, you can call any JavaScript function on the HTML page, passing any number of arguments of any data type, and receive a return value from the call.
From JavaScript on the HTML page, you can call an ActionScript function in Flash Player. The ActionScript function can return a value, and JavaScript receives it immediately as the return value of the call.
ExternalInterface is supported in the following combinations of browser and operating system:
|
Browser |
Operating System |
|
|---|---|---|
|
Internet Explorer 5.0 and higher |
Windows |
|
|
Netscape 8.0 and higher |
Windows |
Macintosh |
|
Mozilla 1.7.5 and higher |
Windows |
Macintosh |
|
Firefox 1.0 and higher |
Windows |
Macintosh |
|
Safari 1.3 and higher |
|
Macintosh |
ExternalInterface requires the user's web browser to support either ActiveX or the NPRuntime API that is exposed by some browsers for plugin scripting. See http://www.mozilla.org/projects/plugins/npruntime.html.
Availability: ActionScript 1.0; Flash Player 8
|
Modifiers |
Property |
Description |
|---|---|---|
|
|
available |
Indicates whether this player is in a container that offers an external interface. |
Properties inherited from class Object
|
Modifiers |
Signature |
Description |
|---|---|---|
|
|
addCallback |
Registers an ActionScript method as callable from the container. |
|
|
call |
Calls a function exposed by the Flash Player container, passing 0 or more arguments. |
Methods inherited from class Object addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00002200.html
Comments
lithiumlab said on Sep 17, 2005 at 9:49 AM :