As discussed in the entry
to
connectionName
domains, you need to define
LocalConnection objects in such a way that Flash does not add the current superdomain to
. You can do this in one of the following two ways:
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
superdomain will be accepted (in this case, myDomain.com) or that connections from any
domain will be accepted.
You cannot specify a superdomain in
object-- you can only do this in the sending
When using this method, consider the Flash Player security model. By default, a
LocalConnection object is associated with the sandbox of the SWF file that created it, and
cross-domain calls to LocalConnection objects are not allowed unless the
LocalConnection.allowDomain()
For more information, see the following:
Chapter 17, "Understanding Security," in Learning ActionScript 2.0 in Flash
The Flash Player 8 Security white paper at http://www.macromedia.com/go/fp8_security
The Flash Player 8 Security-Related API white paper at http://www.macromedia.com/go/
fp8_security_apis
Availability: ActionScript 1.0; Flash Player 6
Parameters
connectionName:String
LocalConnection.connect()
methodName:String
receiving LocalConnection object. The following method names cause the command to fail:
,
,
send
connect
close
[optional] - Arguments to be passed to the specified method.
args:Object
728
ActionScript classes
LocalConnection.connect()
by default. If you are implementing communication between different
connectionName
to specify that connections from any domain will be
connectionName
to specify that connections from the specified
method has been invoked.
- A string that corresponds to the connection name specified in the
command that wants to communicate with
- A string specifying the name of the method to be invoked in the
,
,
domain
onStatus
, Flash adds the current superdomain
in both the sending and receiving
connectionName
in the sending LocalConnection object--for
. In the receiving object, use
in the receiving
connectionName
LocalConnection
, and
.
allowDomain
in both the sending and
LocalConnection
object.
sending_lc
.
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?