EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Available (Externalinterface.available Property); Call (Externalinterface.call Method)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ExternalInterface (flash.external.ExternalInterface) 553
</form>
<script>
function callExternalInterface() {
thisMovie("externalInterfaceExample").goHome();
}
function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName]
}
else {
return document[movieName]
}
}
</script>
available (ExternalInterface.available property)
public static available : Boolean [read-only]
Indicates whether this player is in a container that offers an external interface. If the external
interface is available, this property is
true; otherwise, it is false.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example uses
ExternalInterface.available to determine whether the
player is in a container that offers an external interface.
import flash.external.*;
var isAvailable:Boolean = ExternalInterface.available;
trace(isAvailable);
call (ExternalInterface.call method)
public static call(methodName:String, [parameter1:Object]) : Object
Calls a function exposed by the Flash Player container, passing 0 or more arguments. If the
desired function is not available, the call returns
null; otherwise it returns the value provided
by the function. Recursion is not permitted; a recursive call produces a
null response.
If the container is an HTML page, this method invokes a JavaScript function in a <script>
element.
If the container is some other ActiveX container, this method broadcasts an event with the
specified name, and the container processes the event.

Table of Contents

Related product manuals