User Guide
LocalConnection class 329
Event handler summary for the LocalConnection class
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;
LocalConnection.domain()
Returns a string representing the superdomain of the
location of the current SWF file.
LocalConnection.send()
Invokes a method on a specified LocalConnection object.
Event handler Description
LocalConnection.allowDomain
Invoked whenever the current (receiving) LocalConnection
object receives a request to invoke a method from a
sending LocalConnection object.
LocalConnection.allowInsecureDomain
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.
LocalConnection.onStatus
Invoked after a sending LocalConnection object tries to
send a command to a receiving LocalConnection object.
Method Description