03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ExternalInterface<br />

(flash.external.ExternalInterface)<br />

Object<br />

|<br />

+-flash.external.ExternalInterface<br />

public class ExternalInterface<br />

extends Object<br />

The ExternalInterface class is the External API, an application programming interface that<br />

enables straightforward communication between <strong>ActionScript</strong> <strong>and</strong> the Flash Player container;<br />

for example, an HTML page with JavaScript, or a desktop application with Flash Player<br />

embedded.<br />

ExternalInterface is similar in functionality to the fscomm<strong>and</strong>(), CallFrame() <strong>and</strong><br />

CallLabel() methods, but is more flexible <strong>and</strong> more generally applicable. Use of<br />

ExternalInterface is recommended for JavaScript-<strong>ActionScript</strong> communication.<br />

From <strong>ActionScript</strong>, you can call any JavaScript function on the HTML page, passing any<br />

number of arguments of any data type, <strong>and</strong> receive a return value from the call.<br />

From JavaScript on the HTML page, you can call an <strong>ActionScript</strong> function in Flash Player.<br />

The <strong>ActionScript</strong> function can return a value, <strong>and</strong> JavaScript receives it immediately as the<br />

return value of the call.<br />

ExternalInterface is supported in the following combinations of browser <strong>and</strong> operating<br />

system:<br />

Browser Operating System<br />

Internet Explorer 5.0<br />

<strong>and</strong> higher<br />

Netscape 8.0 <strong>and</strong><br />

higher<br />

Windows<br />

Windows Macintosh<br />

Mozilla 1.7.5 <strong>and</strong> higher Windows Macintosh<br />

Firefox 1.0 <strong>and</strong> higher Windows Macintosh<br />

Safari 1.3 <strong>and</strong> higher Macintosh<br />

ExternalInterface requires the user's web browser to support either ActiveX or the<br />

NPRuntime API that is exposed by some browsers for plugin scripting. See http://<br />

www.mozilla.org/projects/plugins/npruntime.html.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 8<br />

ExternalInterface (flash.external.ExternalInterface) 557

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!