};
my_lc.allowInsecureDomain = function(sendingDomain:String) {
return (sendingDomain == this.domain());
}
my_lc.sayHello = function(name:String) {
welcome_txt.text = "Hello, "+name;
};
my_lc.connect("lc_name");
See also
LocalConnection.allowDomain,
LocalConnection.close()
Availability
Flash Player 6.
Usage
receiving_lc.close() : Void
Parameters
None.
Returns
Nothing.
Description
Method; closes (disconnects) a LocalConnection object. Issue this command when you no
longer want the object to accept commands—for example, when you want to issue a
LocalConnection.connect()
another SWF file.
Example
The following example closes a connection called
component instance called
this.createTextField("welcome_txt", this.getNextHighestDepth(), 10, 10, 100,
22);
this.createTextField("status_txt", this.getNextHighestDepth(), 10, 42,
100,44);
var receiving_lc:LocalConnection = new LocalConnection();
receiving_lc.sayHello = function(name:String) {
welcome_txt.text = "Hello, "+name;
};
receiving_lc.connect("lc_name");
var closeListener:Object = new Object();
closeListener.click = function(evt:Object) {
receiving_lc.close();
status_txt.text = "connection closed";
334
Chapter 6: ActionScript Core Classes
LocalConnection.connect()
command using the same
:
close_button
connectionName
when you click a Button
receiving_lc
parameter in
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?