MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 342

Actionscript language reference
Table of Contents

Advertisement

A string specifying the name of the method to be invoked in the receiving
method
LocalConnection object. The following method names cause the command to fail:
,
connect
close
Optional parameters to be passed to the specified method.
p1,...pN
Returns
A Boolean value:
Note: A return value of
receiving LocalConnection object; it means only that the command is syntactically correct. To
determine whether the connection succeeded, see LocalConnection.onStatus.
Description
Method; invokes the method named
LocalConnection.connect(connectionName)
object). The object used with this command is called the sending LocalConnection object.
The SWF files that contain the sending and receiving objects must be running on the same
client computer.
There is a limit to the amount of data you can pass as parameters to this command. If the
command returns
requests into multiple commands.
As discussed in the entry
connectionName
domains, you need to define
LocalConnection objects in such a way that Flash does not add the current superdomain to
connectionName
Use an underscore (_) at the beginning of
receiving LocalConnection objects. In the SWF file containing the receiving object, use
LocalConnection.allowDomain
accepted. This implementation lets you store your sending and receiving SWF files in
any domain.
Include the superdomain in
example,
myDomain.com:myConnectionName
LocalConnection.allowDomain
will be accepted (in this case, myDomain.com) or that connections from any domain will
be accepted.
Note: You cannot specify a superdomain in
object—you can only do this in the sending LocalConnection object.
Example
For an example of communicating between LocalConnection objects located in the same domain,
see
LocalConnection.connect()
objects located in any domain, see
communicating between LocalConnection objects located in specified domains, see
LocalConnection.allowDomain
342
Chapter 6: ActionScript Core Classes
,
,
, and
domain
onStatus
if Flash can carry out the request;
true
does not necessarily mean that Flash successfully connected to a
true
method
but your syntax is correct, try dividing the
false
LocalConnection.connect()
by default. If you are implementing communication between different
connectionName
. You can do this in one of the following two ways:
to specify that connections from any domain will be
connectionName
to specify that connections from the specified superdomain
. For an example of communicating between LocalConnection
LocalConnection.allowDomain
and
.
allowDomain
false
on a connection opened with the
command (the receiving LocalConnection
, Flash adds the current superdomain to
in both the sending and receiving
connectionName
in the sending LocalConnection object—for
. In the receiving object, use
in the receiving LocalConnection
connectionName
LocalConnection.domain()
send
otherwise.
LocalConnection.send()
in both the sending and
. For an example of
.
,

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents