Client-Side Communication ActionScript > LocalConnection (object) > Constructor for the LocalConnection object

 

Constructor for the LocalConnection object

Availability

Flash Player 6.

Flash Communication Server MX (not required).

Usage

myLC = new LocalConnection()

Parameters

None.

Returns

A reference to a LocalConnection object.

Description

Constructor; creates a LocalConnection object.

Example

The following example shows how a receiving and sending movie create LocalConnnection objects. Note that the two movies can use the same name or different names for their respective LocalConnection objects. In this example, they use the same name—LC.

// code in the receiving movie
LC = new LocalConnection();
LC.someMethod = function()
{
	// your code here
}
LC.connect("connectionName");

// code in the sending movie
LC = new LocalConnection();
LC.send("connectionName", "someMethod");

See also

LocalConnection.connect, LocalConnection.send