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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

■ Include the superdomain in connectionName in the sending LocalConnection object--for<br />

example, myDomain.com:myConnectionName. In the receiving object, use<br />

LocalConnection.allowDomain to specify that connections from the specified<br />

superdomain will be accepted (in this case, myDomain.com) or that connections from any<br />

domain will be accepted.<br />

Note: You cannot specify a superdomain in connectionName in the receiving<br />

LocalConnection object--you can only do this in the sending LocalConnection object.<br />

When using this method, consider the Flash Player security model. By default, a<br />

LocalConnection object is associated with the s<strong>and</strong>box of the SWF file that created it, <strong>and</strong><br />

cross-domain calls to LocalConnection objects are not allowed unless the<br />

LocalConnection.allowDomain() method has been invoked.<br />

For more information, see the following:<br />

■ "Underst<strong>and</strong>ing Security" in Learning <strong>ActionScript</strong> <strong>2.0</strong> in Flash<br />

■ The Flash Player 9 Security white paper at http://www.adobe.com/go/fp9_0_security<br />

■ The Flash Player 8 Security-Related API white paper at http://www.adobe.com/go/<br />

fp8_security_apis<br />

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

Parameters<br />

connectionName:String - A string that corresponds to the connection name specified in the<br />

LocalConnection.connect() comm<strong>and</strong> that wants to communicate with sending_lc.<br />

methodName:String - A string specifying the name of the method to be invoked in the<br />

receiving LocalConnection object. The following method names cause the comm<strong>and</strong> to fail:<br />

send, connect, close, domain, onStatus, <strong>and</strong> allowDomain.<br />

args:Object [optional] - Arguments to be passed to the specified method.<br />

Returns<br />

Boolean - A Boolean value: true if Flash can carry out the request; false otherwise.<br />

Note: A return value of true does not necessarily mean that Flash successfully connected to a<br />

receiving LocalConnection object; it means only that the comm<strong>and</strong> is syntactically correct. To<br />

determine whether the connection succeeded, see LocalConnection.onStatus.<br />

LocalConnection 737

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

Saved successfully!

Ooh no, something went wrong!