720
ActionScript classes
If you are implementing communication between SWF files in different domains, specifying a
string for
connectionName
that begins with an underscore (_) will make the SWF with the
receiving LocalConnection object more portable between domains. Here are the two possible
cases:
■
If the string for
connectionName
does not begin with an underscore (_), Flash Player
adds a prefix with the superdomain and a colon (for example,
"myDomain:connectionName"
). Although this ensures that your connection does not
conflict with connections of the same name from other domains, any sending
LocalConnection objects must specify this superdomain (for example,
"myDomain:connectionName"
). If the SWF with the receiving LocalConnection object is
moved to another domain, the player changes the prefix to reflect the new superdomain
(for example,
"anotherDomain:connectionName"
). All sending LocalConnection
objects would have to be manually edited to point to the new superdomain.
■
If the string for
connectionName
begins with an underscore (for example,
"_connectionName"
), Flash Player does not add a prefix to the string. This means that
the receiving and sending LocalConnection objects will use identical strings for
connectionName
. If the receiving object uses
LocalConnection.allowDomain
to specify
that connections from any domain will be accepted, the SWF with the receiving
LocalConnection object can be moved to another domain without altering any sending
LocalConnection objects.
For more information, see the discussion of
connectionName
in
LocalConnection.send()
and also the
LocalConnection.allowDomain
and
LocalConnection.domain()
entries.
Availability:
ActionScript 1.0; Flash Player 6
Parameters
connectionName
:String
- A string that corresponds to the connection name specified in the
LocalConnection.send()
command that wants to communicate with
receiving_lc
.
Returns
Boolean
- A Boolean value:
true
if no other process running on the same client computer has
already issued this command using the same value for the
connectionName
parameter;
false
otherwise.
NO
T
E
Colons are used as special characters to separate the superdomain from the
connectionName
string. A string for
connectionName
that contains a colon is not valid.
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...