MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 711

Actionscript 2.0 language reference
Table of Contents

Advertisement

The primary methods used to send and receive data are
LocalConnection.connect()
commands; notice that both the
LocalConnection.connect()
// 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");
// Code in the sending SWF file
var sending_lc:LocalConnection = new LocalConnection();
sending_lc.send("lc_name", "methodToExecute", 5, 7);
The simplest way to use a LocalConnection object is to allow communication only between
LocalConnection objects located in the same domain because you won't have security issues.
However, if you need to allow communication between domains, you have several ways to
implement security measures. For more information, see the discussion of the
parameter in
connectionName
LocalConnection.allowDomain
Availability: ActionScript 1.0; Flash Player 6
Property summary
Properties inherited from class Object
constructor (Object.constructor
property),
prototype (Object.prototype
(Object.__resolve property)
. At its most basic, your code will implement the following
LocalConnection.send()
commands specify the same connection name,
LocalConnection.send()
and
LocalConnection.domain()
property),
property),
LocalConnection.send()
and
and the
entries.
__proto__ (Object.__proto__
__resolve
LocalConnection
and
:
lc_name
711

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF