blob: b916c51235c1cca8c8e4a3a9fa02e15c582ddb52 [file] [log] [blame]
{ "type": "class",
"qname": "mx.external.ExternalInterface",
"baseClassname": ""
,
"description": "The ExternalInterface class provides a mechanism for a Royale application to communicate with other JavaScript functionality present within the web page.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9.0", "AIR 1.0"]},
{ "tagName": "productversion",
"values": ["Royale 0.9"]},
{ "tagName": "langversion",
"values": ["3.0"]},
{ "tagName": "royalesuppresspublicvarwarning",
"values": []} ],
"members": [
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "available",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "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."},
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "marshallExceptions",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Indicates whether the external interface should attempt to pass ActionScript exceptions to the current browser and JavaScript exceptions to the player. When running as a SWF: default is false. You must explicitly set this property to true to catch JavaScript exceptions in ActionScript and to catch ActionScript exceptions in JavaScript. When running as HTML, this is always true and cannot be changed."},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "objectID",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Returns the id attribute of the Flash Player object if running as a SWF, or of the HTML element that is used for hooking up callback objects if running in HTML (default then is <code>ExternalInterface</code>). Read-only in SWF mode; read-write in JS mode. This needs to be set prior to any calls to <code>addCallback</code>."},
{ "type": "method",
"qname": "addCallback",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Registers an ActionScript method as callable from the container. After a successful invocation of addCallBack(), the registered function in the player can be called by JavaScript. The JavaScript needs to obtain the appopriate element (set via <code>objectID</code> and then call the function as a property of this element. For example if <code>addCallback</code> has been called with <code>functionName>/code> set to &quot;myFunction&quot;, the call can be made by: <code>document.getElementById(&quot;ExternalInterface&quot;).myFunction(args);</code>",
"tags": [
{ "tagName": "param",
"values": ["functionName The name by which the browser can invoke the function.", "closure The function closure to invoke."]},
{ "tagName": "royaleignorecoercion",
"values": ["HTMLElement"]} ],
"return": "void",
"params": [{ "name": "functionName", "type": "String"},
{ "name": "closure", "type": "Function"}]}
,
{ "type": "method",
"qname": "call",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Calls a function exposed by the browser, passing zero or more arguments. If the function is not available, the call returns <code>null</code>, otherwise it returns the value provided by the function.",
"tags": [
{ "tagName": "param",
"values": ["functionName The name of the JavaScript function to call.", "... args The arguments to pass to the JavaScript function in the browser."]} ],
"return": "*",
"params": [{ "name": "functionName", "type": "String"},
{ "name": "args", "type": "Array"}]}
]
}