MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 716

Actionscript 2.0 language reference
Table of Contents

Advertisement

case 'status' :
status_ta.text = "LocalConnection connected successfully.";
break;
case 'error' :
status_ta.text = "LocalConnection encountered an error.";
break;
}
};
sending_lc.send("_mylc", "sayHello", name_ti.text);
};
send_button.addEventListener("click", sendListener);
If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
previous example.
In the following example, the receiving SWF file, which resides in
commands only from SWF files located in
var aLocalConn:LocalConnection = new LocalConnection();
aLocalConn.Trace = function(aString) {
aTextField += aString+newline;
};
aLocalConn.allowDomain = function(sendingDomain) {
return (sendingDomain == this.domain() || sendingDomain ==
"www.macromedia.com");
};
aLocalConn.connect("_mylc");
When published for Flash Player 7 or later, exact domain matching is used. This means that
the example will fail if the SWF files are located at www.thatDomain.com but will work if the
files are located at thatDomain.com.
See also
connect (LocalConnection.connect method)
,
method)
send (LocalConnection.send method)
onLoadComplete (MovieClipLoader.onLoadComplete event listener)
property
716
ActionScript classes
MovieClip.getNextHighestDepth()
thisDomain.com
,
domain (LocalConnection.domain
,
_url (MovieClip._url property)
method used in the
thisDomain.com
or
:
thatDomain.com
,
_parent
, accepts
,

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