LocalConnection.connect()
Availability
Flash Player 6.
Usage
receiving_lc.connect(connectionName)
Parameters
connectionName
LocalConnection.send()
Returns
A Boolean value of
issued this command using the same value for the
Description
Method; prepares a LocalConnection object to receive commands from a
LocalConnection.send()
used with this command is called the "receiving LocalConnection object." The receiving and
sending objects must be running on the same client machine.
Be sure to define the methods attached to
all the examples in this section.
By default, the Flash Player resolves
"superdomain:connectionName"
containing the
LocalConnection.connect()
containing the receiving LocalConnection object is located at www.someDomain.com,
connectionName
the client machine, the value assigned to
Also by default, the Flash Player lets the receiving LocalConnection object accept commands only
from sending LocalConnection objects whose connection name also resolves into a value of
"superdomain:connectionName"
in the same domain to communicate with each other.
If you are implementing communication only between SWF files in the same domain, specify a
string for
connectionName
domain name (for example,
LocalConnection.connect(connectionName)
If you are implementing communication between SWF files located in different domains,
see the discussion of
LocalConnection.allowDomain
A string that corresponds to the connection name specified in the
command that wants to communicate with
if no other process running on the same client machine has already
true
command (called the "sending LocalConnection object"). The object
connectionName
, where
resolves to
"someDomain.com:connectionName"
. In this way, Flash makes it very simple for SWF files located
that does not begin with an underscore (_) and that does not specify a
"myDomain:connectionName"
in
connectionName
and
LocalConnection.domain()
connectionName
before calling this method, as shown in
receiving_lc
into a value of
is the superdomain of the SWF file
superdomain
command. For example, if the SWF file
is
superdomain
"localhost"
). Use the same string in the
command.
LocalConnection.send()
.
receiving_lc
parameter,
otherwise.
false
. (If a SWF file is located on
.)
, and also the
entries.
LocalConnection.connect()
439
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers