Externalinterface (Flash.external.externalinterface) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Example
In the following example, a function throws an error (with a specified message) if the two
strings that are passed to it are not identical:
function compareStrings(str1_str:String, str2_str:String):Void {
if (str1_str != str2_str) {
throw new Error("Strings do not match.");
}
}
try {
compareStrings("Dog", "dog");
// output: Strings do not match.
} catch (e_err:Error) {
trace(e_err.toString());
}
See also
message (Error.message property)
statement
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
methods, but is more flexible and more generally applicable. Use of
CallLabel()
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.
,
,
throw statement
fscommand()

ExternalInterface (flash.external.ExternalInterface)

try..catch..finally
,
and
CallFrame()
549

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF