Event handler summary for the LocalConnection class
Event handler
LocalConnection.allowDomain
LocalConnection.allowInsecureDomain
LocalConnection.onStatus
Constructor for the LocalConnection class
Availability
Flash Player 6.
Usage
new LocalConnection() : LocalConnection
Parameters
None.
Returns
A reference to a LocalConnection object.
Description
Constructor; creates a LocalConnection object.
Example
The following example shows how receiving and sending SWF files create LocalConnnection
objects. The two SWF files can use the same name or different names for their respective
LocalConnection objects. In this example they use different names.
// Code in the receiving SWF file
this.createTextField("result_txt", 1, 10, 10, 100, 22);
result_txt.border = true;
var receiving_lc:LocalConnection = new LocalConnection();
receiving_lc.methodToExecute = function(param1:Number, param2:Number) {
result_txt.text = param1+param2;
};
receiving_lc.connect("lc_name");
The following SWF file sends the request to the first SWF file.
// Code in the sending SWF file
var sending_lc:LocalConnection = new LocalConnection();
sending_lc.send("lc_name", "methodToExecute", 5, 7);
Description
Invoked whenever the current (receiving) LocalConnection
object receives a request to invoke a method from a
sending LocalConnection object.
Invoked whenever the current (receiving) LocalConnection
object, which is in a SWF file hosted at a domain using a
secure protocol (HTTPS), receives a request to invoke a
method from a sending LocalConnection object that is in a
SWF file hosted at a non-secure protocol.
Invoked after a sending LocalConnection object tries to
send a command to a receiving LocalConnection object.
LocalConnection class
401
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers