563 lines
		
	
	
		
			31 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			563 lines
		
	
	
		
			31 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!doctype html>
 | ||
| <html class="default no-js">
 | ||
| <head>
 | ||
| 	<meta charset="utf-8">
 | ||
| 	<meta http-equiv="X-UA-Compatible" content="IE=edge">
 | ||
| 	<title>ExternalInterface | openfl</title>
 | ||
| 	<meta name="description" content="">
 | ||
| 	<meta name="viewport" content="width=device-width, initial-scale=1">
 | ||
| 	<link rel="stylesheet" href="../assets/css/main.css">
 | ||
| </head>
 | ||
| <body>
 | ||
| <header>
 | ||
| 	<div class="tsd-page-toolbar">
 | ||
| 		<div class="container">
 | ||
| 			<div class="table-wrap">
 | ||
| 				<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
 | ||
| 					<div class="field">
 | ||
| 						<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
 | ||
| 						<input id="tsd-search-field" type="text" />
 | ||
| 					</div>
 | ||
| 					<ul class="results">
 | ||
| 						<li class="state loading">Preparing search index...</li>
 | ||
| 						<li class="state failure">The search index is not available</li>
 | ||
| 					</ul>
 | ||
| 					<a href="../index.html" class="title">openfl</a>
 | ||
| 				</div>
 | ||
| 				<div class="table-cell" id="tsd-widgets">
 | ||
| 					<div id="tsd-filter">
 | ||
| 						<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
 | ||
| 						<div class="tsd-filter-group">
 | ||
| 							<div class="tsd-select" id="tsd-filter-visibility">
 | ||
| 								<span class="tsd-select-label">All</span>
 | ||
| 								<ul class="tsd-select-list">
 | ||
| 									<li data-value="public">Public</li>
 | ||
| 									<li data-value="protected">Public/Protected</li>
 | ||
| 									<li data-value="private" class="selected">All</li>
 | ||
| 								</ul>
 | ||
| 							</div>
 | ||
| 							<input type="checkbox" id="tsd-filter-inherited" checked />
 | ||
| 							<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
 | ||
| 							<input type="checkbox" id="tsd-filter-externals" checked />
 | ||
| 							<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
 | ||
| 							<input type="checkbox" id="tsd-filter-only-exported" />
 | ||
| 							<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
 | ||
| 						</div>
 | ||
| 					</div>
 | ||
| 					<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
 | ||
| 				</div>
 | ||
| 			</div>
 | ||
| 		</div>
 | ||
| 	</div>
 | ||
| 	<div class="tsd-page-title">
 | ||
| 		<div class="container">
 | ||
| 			<ul class="tsd-breadcrumb">
 | ||
| 				<li>
 | ||
| 					<a href="../index.html">openfl</a>
 | ||
| 				</li>
 | ||
| 				<li>
 | ||
| 					<a href="../modules/openfl.external.html">external</a>
 | ||
| 				</li>
 | ||
| 				<li>
 | ||
| 					<a href="openfl.external.externalinterface.html">ExternalInterface</a>
 | ||
| 				</li>
 | ||
| 			</ul>
 | ||
| 			<h1>Class ExternalInterface</h1>
 | ||
| 		</div>
 | ||
| 	</div>
 | ||
| </header>
 | ||
| <div class="container container-main">
 | ||
| 	<div class="row">
 | ||
| 		<div class="col-8 col-content">
 | ||
| 			<section class="tsd-panel tsd-comment">
 | ||
| 				<div class="tsd-comment tsd-typography">
 | ||
| 					<div class="lead">
 | ||
| 						<p>The ExternalInterface class is an application programming interface that
 | ||
| 							enables straightforward communication between ActionScript and the SWF
 | ||
| 							container– for example, an HTML page with JavaScript or a desktop
 | ||
| 						application that uses Flash Player to display a SWF file.</p>
 | ||
| 					</div>
 | ||
| 					<p>Using the ExternalInterface class, you can call an ActionScript function
 | ||
| 						in the Flash runtime, using JavaScript in the HTML page. The ActionScript
 | ||
| 						function can return a value, and JavaScript receives it immediately as the
 | ||
| 					return value of the call.</p>
 | ||
| 					<p>This functionality replaces the <code>fscommand()</code> method.</p>
 | ||
| 					<p>Use the ExternalInterface class in the following combinations of browser
 | ||
| 					and operating system:</p>
 | ||
| 					<p>The ExternalInterface class requires the user's web browser to support
 | ||
| 						either ActiveX<sup>®</sup> or the NPRuntime API that is exposed by some
 | ||
| 						browsers for plug-in scripting. Even if a browser and operating system
 | ||
| 						combination are not listed above, they should support the ExternalInterface
 | ||
| 						class if they support the NPRuntime API. See
 | ||
| 					<a href="http://www.mozilla.org/projects/plugins/npruntime.html">http://www.mozilla.org/projects/plugins/npruntime.html</a>..</p>
 | ||
| 					<p><strong>Note:</strong> When embedding SWF files within an HTML page, make sure
 | ||
| 						that the <code>id</code> attribute is set and the <code>id</code> and
 | ||
| 						<code>name</code> attributes of the <code>object</code> and
 | ||
| 						<code>embed</code> tags do not include the following characters:
 | ||
| 					<code>. - + ~~ / \</code></p>
 | ||
| 					<p><strong>Note for Flash Player applications:</strong> Flash Player version
 | ||
| 						9.0.115.0 and later allows the <code>.</code>(period) character within the
 | ||
| 					<code>id</code> and <code>name</code> attributes.</p>
 | ||
| 					<p><strong>Note for Flash Player applications:</strong> In Flash Player 10 and later
 | ||
| 						running in a browser, using this class programmatically to open a pop-up
 | ||
| 						window may not be successful. Various browsers(and browser configurations)
 | ||
| 						may block pop-up windows at any time; it is not possible to guarantee any
 | ||
| 						pop-up window will appear. However, for the best chance of success, use
 | ||
| 						this class to open a pop-up window only in code that executes as a direct
 | ||
| 						result of a user action(for example, in an event handler for a mouse click
 | ||
| 					or key-press event.)</p>
 | ||
| 					<p>From ActionScript, you can do the following on the HTML page:</p>
 | ||
| 					<ul>
 | ||
| 						<li>Call any JavaScript function.</li>
 | ||
| 						<li>Pass any number of arguments, with any names.</li>
 | ||
| 						<li>Pass various data types(Boolean, Number, String, and so on).</li>
 | ||
| 						<li>Receive a return value from the JavaScript function.</li>
 | ||
| 					</ul>
 | ||
| 					<p>From JavaScript on the HTML page, you can:</p>
 | ||
| 					<ul>
 | ||
| 						<li>Call an ActionScript function.</li>
 | ||
| 						<li>Pass arguments using standard function call notation.</li>
 | ||
| 						<li>Return a value to the JavaScript function.</li>
 | ||
| 					</ul>
 | ||
| 					<p><strong>Note for Flash Player applications:</strong> Flash Player does not
 | ||
| 					currently support SWF files embedded within HTML forms.</p>
 | ||
| 					<p><strong>Note for AIR applications:</strong> In Adobe AIR, the ExternalInterface
 | ||
| 						class can be used to communicate between JavaScript in an HTML page loaded
 | ||
| 						in the HTMLLoader control and ActionScript in SWF content embedded in that
 | ||
| 					HTML page.</p>
 | ||
| 				</div>
 | ||
| 			</section>
 | ||
| 			<section class="tsd-panel tsd-hierarchy">
 | ||
| 				<h3>Hierarchy</h3>
 | ||
| 				<ul class="tsd-hierarchy">
 | ||
| 					<li>
 | ||
| 						<span class="target">ExternalInterface</span>
 | ||
| 					</li>
 | ||
| 				</ul>
 | ||
| 			</section>
 | ||
| 			<section class="tsd-panel-group tsd-index-group">
 | ||
| 				<h2>Index</h2>
 | ||
| 				<section class="tsd-panel tsd-index-panel">
 | ||
| 					<div class="tsd-index-content">
 | ||
| 						<section class="tsd-index-section tsd-is-external">
 | ||
| 							<h3>Properties</h3>
 | ||
| 							<ul class="tsd-index-list">
 | ||
| 								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="openfl.external.externalinterface.html#available" class="tsd-kind-icon">available</a></li>
 | ||
| 								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="openfl.external.externalinterface.html#marshallexceptions" class="tsd-kind-icon">marshall<wbr>Exceptions</a></li>
 | ||
| 								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="openfl.external.externalinterface.html#objectid" class="tsd-kind-icon">objectID</a></li>
 | ||
| 							</ul>
 | ||
| 						</section>
 | ||
| 						<section class="tsd-index-section tsd-is-external">
 | ||
| 							<h3>Methods</h3>
 | ||
| 							<ul class="tsd-index-list">
 | ||
| 								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="openfl.external.externalinterface.html#addcallback" class="tsd-kind-icon">add<wbr>Callback</a></li>
 | ||
| 								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="openfl.external.externalinterface.html#call" class="tsd-kind-icon">call</a></li>
 | ||
| 							</ul>
 | ||
| 						</section>
 | ||
| 					</div>
 | ||
| 				</section>
 | ||
| 			</section>
 | ||
| 			<section class="tsd-panel-group tsd-member-group tsd-is-external">
 | ||
| 				<h2>Properties</h2>
 | ||
| 				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external">
 | ||
| 					<a name="available" class="tsd-anchor"></a>
 | ||
| 					<h3><span class="tsd-flag ts-flagStatic">Static</span> available</h3>
 | ||
| 					<div class="tsd-signature tsd-kind-icon">available<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
 | ||
| 					<aside class="tsd-sources">
 | ||
| 						<ul>
 | ||
| 							<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/external/ExternalInterface.d.ts#L83">lib/openfl/external/ExternalInterface.d.ts:83</a></li>
 | ||
| 						</ul>
 | ||
| 					</aside>
 | ||
| 					<div class="tsd-comment tsd-typography">
 | ||
| 						<div class="lead">
 | ||
| 							<p>Indicates whether this player is in a container that offers an external
 | ||
| 								interface. If the external interface is available, this property is
 | ||
| 							<code>true</code>; otherwise, it is <code>false</code>.</p>
 | ||
| 						</div>
 | ||
| 						<p><strong>Note:</strong> When using the External API with HTML, always check that
 | ||
| 							the HTML has finished loading before you attempt to call any JavaScript
 | ||
| 						methods.</p>
 | ||
| 					</div>
 | ||
| 				</section>
 | ||
| 				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external">
 | ||
| 					<a name="marshallexceptions" class="tsd-anchor"></a>
 | ||
| 					<h3><span class="tsd-flag ts-flagStatic">Static</span> marshall<wbr>Exceptions</h3>
 | ||
| 					<div class="tsd-signature tsd-kind-icon">marshall<wbr>Exceptions<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
 | ||
| 					<aside class="tsd-sources">
 | ||
| 						<ul>
 | ||
| 							<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/external/ExternalInterface.d.ts#L92">lib/openfl/external/ExternalInterface.d.ts:92</a></li>
 | ||
| 						</ul>
 | ||
| 					</aside>
 | ||
| 					<div class="tsd-comment tsd-typography">
 | ||
| 						<div class="lead">
 | ||
| 							<p>Indicates whether the external interface should attempt to pass
 | ||
| 								ActionScript exceptions to the current browser and JavaScript exceptions
 | ||
| 								to the player. You must explicitly set this property to <code>true</code>
 | ||
| 								to catch JavaScript exceptions in ActionScript and to catch ActionScript
 | ||
| 							exceptions in JavaScript.</p>
 | ||
| 						</div>
 | ||
| 					</div>
 | ||
| 				</section>
 | ||
| 				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external">
 | ||
| 					<a name="objectid" class="tsd-anchor"></a>
 | ||
| 					<h3><span class="tsd-flag ts-flagStatic">Static</span> objectID</h3>
 | ||
| 					<div class="tsd-signature tsd-kind-icon">objectID<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
 | ||
| 					<aside class="tsd-sources">
 | ||
| 						<ul>
 | ||
| 							<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/external/ExternalInterface.d.ts#L99">lib/openfl/external/ExternalInterface.d.ts:99</a></li>
 | ||
| 						</ul>
 | ||
| 					</aside>
 | ||
| 					<div class="tsd-comment tsd-typography">
 | ||
| 						<div class="lead">
 | ||
| 							<p>Returns the <code>id</code> attribute of the <code>object</code> tag in
 | ||
| 								Internet Explorer, or the <code>name</code> attribute of the
 | ||
| 							<code>embed</code> tag in Netscape.</p>
 | ||
| 						</div>
 | ||
| 					</div>
 | ||
| 				</section>
 | ||
| 			</section>
 | ||
| 			<section class="tsd-panel-group tsd-member-group tsd-is-external">
 | ||
| 				<h2>Methods</h2>
 | ||
| 				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
 | ||
| 					<a name="addcallback" class="tsd-anchor"></a>
 | ||
| 					<h3><span class="tsd-flag ts-flagStatic">Static</span> add<wbr>Callback</h3>
 | ||
| 					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
 | ||
| 						<li class="tsd-signature tsd-kind-icon">add<wbr>Callback<span class="tsd-signature-symbol">(</span>functionName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, closure<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
 | ||
| 					</ul>
 | ||
| 					<ul class="tsd-descriptions">
 | ||
| 						<li class="tsd-description">
 | ||
| 							<aside class="tsd-sources">
 | ||
| 								<ul>
 | ||
| 									<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/external/ExternalInterface.d.ts#L156">lib/openfl/external/ExternalInterface.d.ts:156</a></li>
 | ||
| 								</ul>
 | ||
| 							</aside>
 | ||
| 							<div class="tsd-comment tsd-typography">
 | ||
| 								<div class="lead">
 | ||
| 									<p>Registers an ActionScript method as callable from the container. After a
 | ||
| 										successful invocation of <code>addCallBack()</code>, the registered
 | ||
| 										function in the player can be called by JavaScript or ActiveX code in the
 | ||
| 									container.</p>
 | ||
| 								</div>
 | ||
| 								<p><strong>Note:</strong> For <em>local</em> content running in a browser, calls to
 | ||
| 									the <code>ExternalInterface.addCallback()</code> method work only if the
 | ||
| 									SWF file and the containing web page are in the local-trusted security
 | ||
| 									sandbox. For more information, see the Flash Player Developer Center
 | ||
| 								Topic: <a href="http://www.adobe.com/go/devnet_security_en">Security</a>.</p>
 | ||
| 								<dl class="tsd-comment-tags">
 | ||
| 									<dt>throws</dt>
 | ||
| 									<dd><p>Error         The container does not support incoming calls.
 | ||
| 											Incoming calls are supported only in Internet
 | ||
| 											Explorer for Windows and browsers that use the
 | ||
| 											NPRuntime API such as Mozilla 1.7.5 and later or
 | ||
| 										Firefox 1.0 and later.</p>
 | ||
| 									</dd>
 | ||
| 									<dt>throws</dt>
 | ||
| 									<dd><p>SecurityError A callback with the specified name has already been
 | ||
| 											added by ActionScript in a sandbox to which you do
 | ||
| 											not have access; you cannot overwrite that callback.
 | ||
| 											To work around this problem, rewrite the
 | ||
| 											ActionScript that originally called the
 | ||
| 											<code>addCallback()</code> method so that it also
 | ||
| 											calls the <code>Security.allowDomain()</code>
 | ||
| 										method.</p>
 | ||
| 									</dd>
 | ||
| 									<dt>throws</dt>
 | ||
| 									<dd><p>SecurityError The containing environment belongs to a security
 | ||
| 											sandbox to which the calling code does not have
 | ||
| 										access. To fix this problem, follow these steps:</p>
 | ||
| 										<pre><code>                   <span class="hljs-number">1.</span> In <span class="hljs-keyword">the</span> `object` tag <span class="hljs-keyword">for</span> <span class="hljs-keyword">the</span> SWF
 | ||
|                   <span class="hljs-built_in">file</span> <span class="hljs-keyword">in</span> <span class="hljs-keyword">the</span> containing HTML page, <span class="hljs-built_in">set</span> <span class="hljs-keyword">the</span> following
 | ||
|                   parameter:
 | ||
| 
 | ||
|                   `<<span class="hljs-built_in">param</span> name=<span class="hljs-string">"allowScriptAccess"</span>
 | ||
|                   <span class="hljs-built_in">value</span>=<span class="hljs-string">"always"</span> />`
 | ||
| 
 | ||
|                    <span class="hljs-number">2.</span> In <span class="hljs-keyword">the</span> SWF <span class="hljs-built_in">file</span>, <span class="hljs-built_in">add</span> <span class="hljs-keyword">the</span> following
 | ||
|                   ActionScript:
 | ||
| 
 | ||
| 
 | ||
|                   `flash.<span class="hljs-keyword">system</span>.Security.allowDomain(<span class="hljs-title">_source</span>Domain_)`
 | ||
| </code></pre></dd>
 | ||
| 								</dl>
 | ||
| 							</div>
 | ||
| 							<h4 class="tsd-parameters-title">Parameters</h4>
 | ||
| 							<ul class="tsd-parameters">
 | ||
| 								<li>
 | ||
| 									<h5>functionName: <span class="tsd-signature-type">string</span></h5>
 | ||
| 									<div class="tsd-comment tsd-typography">
 | ||
| 										<p>The name by which the container can invoke the
 | ||
| 										function.</p>
 | ||
| 									</div>
 | ||
| 								</li>
 | ||
| 								<li>
 | ||
| 									<h5>closure: <span class="tsd-signature-type">any</span></h5>
 | ||
| 									<div class="tsd-comment tsd-typography">
 | ||
| 										<p>The function closure to invoke. This could be a
 | ||
| 											free-standing function, or it could be a method
 | ||
| 											closure referencing a method of an object instance. By
 | ||
| 											passing a method closure, you can direct the callback
 | ||
| 										at a method of a particular object instance.</p>
 | ||
| 										<pre><code>                **Note:** Repeating `addCallback()`
 | ||
|                 on an existing callback function <span class="hljs-keyword">with</span> a
 | ||
|                 `null` closure value removes the
 | ||
|                 callback.
 | ||
| </code></pre>
 | ||
| 									</div>
 | ||
| 								</li>
 | ||
| 							</ul>
 | ||
| 							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
 | ||
| 						</li>
 | ||
| 					</ul>
 | ||
| 				</section>
 | ||
| 				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
 | ||
| 					<a name="call" class="tsd-anchor"></a>
 | ||
| 					<h3><span class="tsd-flag ts-flagStatic">Static</span> call</h3>
 | ||
| 					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
 | ||
| 						<li class="tsd-signature tsd-kind-icon">call<span class="tsd-signature-symbol">(</span>functionName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-signature-symbol">...</span>args<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
 | ||
| 					</ul>
 | ||
| 					<ul class="tsd-descriptions">
 | ||
| 						<li class="tsd-description">
 | ||
| 							<aside class="tsd-sources">
 | ||
| 								<ul>
 | ||
| 									<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/external/ExternalInterface.d.ts#L226">lib/openfl/external/ExternalInterface.d.ts:226</a></li>
 | ||
| 								</ul>
 | ||
| 							</aside>
 | ||
| 							<div class="tsd-comment tsd-typography">
 | ||
| 								<div class="lead">
 | ||
| 									<p>Calls a function exposed by the SWF container, 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. Recursion is <em>not</em> permitted on Opera or Netscape browsers;
 | ||
| 										on these browsers a recursive call produces a <code>null</code> response.
 | ||
| 									(Recursion is supported on Internet Explorer and Firefox browsers.)</p>
 | ||
| 								</div>
 | ||
| 								<p>If the container is an HTML page, this method invokes a JavaScript
 | ||
| 								function in a <code>script</code> element.</p>
 | ||
| 								<p>If the container is another ActiveX container, this method dispatches
 | ||
| 									the FlashCall ActiveX event with the specified name, and the container
 | ||
| 								processes the event.</p>
 | ||
| 								<p>If the container is hosting the Netscape plug-in, you can either write
 | ||
| 									custom support for the new NPRuntime interface or embed an HTML control
 | ||
| 									and embed the player within the HTML control. If you embed an HTML
 | ||
| 									control, you can communicate with the player through a JavaScript
 | ||
| 								interface to the native container application.</p>
 | ||
| 								<p><strong>Note:</strong> For <em>local</em> content running in a browser, calls to
 | ||
| 									the <code>ExternalInterface.call()</code> method are permitted only if the
 | ||
| 									SWF file and the containing web page(if there is one) are in the
 | ||
| 									local-trusted security sandbox. Also, you can prevent a SWF file from
 | ||
| 									using this method by setting the <code>allowNetworking</code> parameter of
 | ||
| 									the <code>object</code> and <code>embed</code> tags in the HTML page that
 | ||
| 									contains the SWF content. For more information, see the Flash Player
 | ||
| 								Developer Center Topic: <a href="http://www.adobe.com/go/devnet_security_en">Security</a>.</p>
 | ||
| 								<p><strong>Note for Flash Player applications:</strong> In Flash Player 10 and Flash
 | ||
| 									Player 9 Update 5, some web browsers restrict this method if a pop-up
 | ||
| 									blocker is enabled. In this scenario, you can only call this method
 | ||
| 									successfully in response to a user event(for example, in an event handler
 | ||
| 								for a mouse click or keypress event).</p>
 | ||
| 								<dl class="tsd-comment-tags">
 | ||
| 									<dt>throws</dt>
 | ||
| 									<dd><p>Error         The container does not support outgoing calls.
 | ||
| 											Outgoing calls are supported only in Internet
 | ||
| 											Explorer for Windows and browsers that use the
 | ||
| 											NPRuntime API such as Mozilla 1.7.5 and later or
 | ||
| 										Firefox 1.0 and later.</p>
 | ||
| 									</dd>
 | ||
| 									<dt>throws</dt>
 | ||
| 									<dd><p>SecurityError The containing environment belongs to a security
 | ||
| 											sandbox to which the calling code does not have
 | ||
| 										access. To fix this problem, follow these steps:</p>
 | ||
| 										<pre><code>                   <span class="hljs-number">1.</span> In <span class="hljs-keyword">the</span> `object` tag <span class="hljs-keyword">for</span> <span class="hljs-keyword">the</span> SWF
 | ||
|                   <span class="hljs-built_in">file</span> <span class="hljs-keyword">in</span> <span class="hljs-keyword">the</span> containing HTML page, <span class="hljs-built_in">set</span> <span class="hljs-keyword">the</span> following
 | ||
|                   parameter:
 | ||
| 
 | ||
|                   `<<span class="hljs-built_in">param</span> name=<span class="hljs-string">"allowScriptAccess"</span>
 | ||
|                   <span class="hljs-built_in">value</span>=<span class="hljs-string">"always"</span> />`
 | ||
| 
 | ||
|                    <span class="hljs-number">2.</span> In <span class="hljs-keyword">the</span> SWF <span class="hljs-built_in">file</span>, <span class="hljs-built_in">add</span> <span class="hljs-keyword">the</span> following
 | ||
|                   ActionScript:
 | ||
| 
 | ||
| 
 | ||
|                   `flash.<span class="hljs-keyword">system</span>.Security.allowDomain(<span class="hljs-title">_source</span>Domain_)`
 | ||
| </code></pre></dd>
 | ||
| 								</dl>
 | ||
| 							</div>
 | ||
| 							<h4 class="tsd-parameters-title">Parameters</h4>
 | ||
| 							<ul class="tsd-parameters">
 | ||
| 								<li>
 | ||
| 									<h5>functionName: <span class="tsd-signature-type">string</span></h5>
 | ||
| 									<div class="tsd-comment tsd-typography">
 | ||
| 										<p>The alphanumeric name of the function to call in the
 | ||
| 											container. Using a non-alphanumeric function name
 | ||
| 											causes a runtime error(error 2155). You can use a
 | ||
| 										<code>try..catch</code> block to handle the error.</p>
 | ||
| 									</div>
 | ||
| 								</li>
 | ||
| 								<li>
 | ||
| 									<h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>args: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5>
 | ||
| 								</li>
 | ||
| 							</ul>
 | ||
| 							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
 | ||
| 							<p>The response received from the container. If the call failed–
 | ||
| 								for example, if there is no such function in the container, the
 | ||
| 								interface is not available, a recursion occurred(with a Netscape
 | ||
| 								or Opera browser), or there is a security issue–
 | ||
| 							<code>null</code> is returned and an error is thrown.</p>
 | ||
| 						</li>
 | ||
| 					</ul>
 | ||
| 				</section>
 | ||
| 			</section>
 | ||
| 		</div>
 | ||
| 		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
 | ||
| 			<nav class="tsd-navigation primary">
 | ||
| 				<ul>
 | ||
| 					<li class="label tsd-is-external">
 | ||
| 						<span>Externals</span>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.desktop.html">openfl.desktop</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.display.html">openfl.display</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.display3d.html">openfl.display3D</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.errors.html">openfl.errors</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.events.html">openfl.events</a>
 | ||
| 					</li>
 | ||
| 					<li class="current tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.external.html">openfl.external</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.filters.html">openfl.filters</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.geom.html">openfl.geom</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.media.html">openfl.media</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.net.html">openfl.net</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.profiler.html">openfl.profiler</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.sensors.html">openfl.sensors</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.system.html">openfl.system</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.text.html">openfl.text</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.ui.html">openfl.ui</a>
 | ||
| 					</li>
 | ||
| 					<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="../modules/openfl.utils.html">openfl.utils</a>
 | ||
| 					</li>
 | ||
| 				</ul>
 | ||
| 			</nav>
 | ||
| 			<nav class="tsd-navigation secondary menu-sticky">
 | ||
| 				<ul class="before-current">
 | ||
| 				</ul>
 | ||
| 				<ul class="current">
 | ||
| 					<li class="current tsd-kind-class tsd-parent-kind-module tsd-is-external">
 | ||
| 						<a href="openfl.external.externalinterface.html" class="tsd-kind-icon">External<wbr>Interface</a>
 | ||
| 						<ul>
 | ||
| 							<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external">
 | ||
| 								<a href="openfl.external.externalinterface.html#available" class="tsd-kind-icon">available</a>
 | ||
| 							</li>
 | ||
| 							<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external">
 | ||
| 								<a href="openfl.external.externalinterface.html#marshallexceptions" class="tsd-kind-icon">marshall<wbr>Exceptions</a>
 | ||
| 							</li>
 | ||
| 							<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external">
 | ||
| 								<a href="openfl.external.externalinterface.html#objectid" class="tsd-kind-icon">objectID</a>
 | ||
| 							</li>
 | ||
| 							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
 | ||
| 								<a href="openfl.external.externalinterface.html#addcallback" class="tsd-kind-icon">add<wbr>Callback</a>
 | ||
| 							</li>
 | ||
| 							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
 | ||
| 								<a href="openfl.external.externalinterface.html#call" class="tsd-kind-icon">call</a>
 | ||
| 							</li>
 | ||
| 						</ul>
 | ||
| 					</li>
 | ||
| 				</ul>
 | ||
| 				<ul class="after-current">
 | ||
| 				</ul>
 | ||
| 			</nav>
 | ||
| 		</div>
 | ||
| 	</div>
 | ||
| </div>
 | ||
| <footer class="with-border-bottom">
 | ||
| 	<div class="container">
 | ||
| 		<h2>Legend</h2>
 | ||
| 		<div class="tsd-legend-group">
 | ||
| 			<ul class="tsd-legend">
 | ||
| 				<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
 | ||
| 				<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
 | ||
| 				<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
 | ||
| 				<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
 | ||
| 				<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
 | ||
| 				<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
 | ||
| 				<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
 | ||
| 			</ul>
 | ||
| 			<ul class="tsd-legend">
 | ||
| 				<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
 | ||
| 				<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
 | ||
| 				<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
 | ||
| 				<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
 | ||
| 			</ul>
 | ||
| 			<ul class="tsd-legend">
 | ||
| 				<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
 | ||
| 				<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
 | ||
| 				<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
 | ||
| 				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 | ||
| 				<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
 | ||
| 				<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
 | ||
| 			</ul>
 | ||
| 			<ul class="tsd-legend">
 | ||
| 				<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
 | ||
| 				<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
 | ||
| 				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
 | ||
| 				<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
 | ||
| 				<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
 | ||
| 				<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
 | ||
| 				<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
 | ||
| 			</ul>
 | ||
| 			<ul class="tsd-legend">
 | ||
| 				<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
 | ||
| 				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
 | ||
| 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 | ||
| 				<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
 | ||
| 			</ul>
 | ||
| 			<ul class="tsd-legend">
 | ||
| 				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
 | ||
| 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
 | ||
| 				<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
 | ||
| 			</ul>
 | ||
| 			<ul class="tsd-legend">
 | ||
| 				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
 | ||
| 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
 | ||
| 				<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
 | ||
| 			</ul>
 | ||
| 			<ul class="tsd-legend">
 | ||
| 				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 | ||
| 				<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
 | ||
| 			</ul>
 | ||
| 		</div>
 | ||
| 	</div>
 | ||
| </footer>
 | ||
| <div class="container tsd-generator">
 | ||
| 	<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
 | ||
| </div>
 | ||
| <div class="overlay"></div>
 | ||
| <script src="../assets/js/main.js"></script>
 | ||
| <script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
 | ||
| </body>
 | ||
| </html> |