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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

If you are implementing communication only between SWF files in the same domain, specify<br />

a string for connectionName that does not begin with an underscore (_) <strong>and</strong> that does not<br />

specify a domain name (for example, "myDomain:connectionName"). Use the same string in<br />

the LocalConnection.connect(connectionName) comm<strong>and</strong>.<br />

If you are implementing communication between SWF files in different domains, specifying a<br />

string for connectionName that begins with an underscore (_) will make the SWF with the<br />

receiving LocalConnection object more portable between domains. Here are the two possible<br />

cases:<br />

■ If the string for connectionName does not begin with an underscore (_), Flash Player<br />

adds a prefix with the superdomain <strong>and</strong> a colon (for example,<br />

"myDomain:connectionName"). Although this ensures that your connection does not<br />

conflict with connections of the same name from other domains, any sending<br />

LocalConnection objects must specify this superdomain (for example,<br />

"myDomain:connectionName"). If the SWF with the receiving LocalConnection object is<br />

moved to another domain, the player changes the prefix to reflect the new superdomain<br />

(for example, "anotherDomain:connectionName"). All sending LocalConnection<br />

objects would have to be manually edited to point to the new superdomain.<br />

■ If the string for connectionName begins with an underscore (for example,<br />

"_connectionName"), Flash Player does not add a prefix to the string. This means that<br />

the receiving <strong>and</strong> sending LocalConnection objects will use identical strings for<br />

connectionName. If the receiving object uses LocalConnection.allowDomain to specify<br />

that connections from any domain will be accepted, the SWF with the receiving<br />

LocalConnection object can be moved to another domain without altering any sending<br />

LocalConnection objects.<br />

For more information, see the discussion of connectionName in LocalConnection.send()<br />

<strong>and</strong> also the LocalConnection.allowDomain <strong>and</strong> LocalConnection.domain() entries.<br />

Note: Colons are used as special characters to separate the superdomain from the<br />

connectionName string. A string for connectionName that contains a colon is not valid.<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.send() comm<strong>and</strong> that wants to communicate with receiving_lc.<br />

LocalConnection 729

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

Saved successfully!

Ooh no, something went wrong!