Close (Localconnection.close Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

my_lc.sayHello = function(name:String) {
welcome_txt.text = "Hello, "+name;
};
my_lc.connect("lc_name");
If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
this example.
See also
allowDomain (LocalConnection.allowDomain handler)
(LocalConnection.connect method)

close (LocalConnection.close method)

public close() : Void
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.
Availability: ActionScript 1.0; Flash Player 6
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";
};
close_button.addEventListener("click", closeListener);
718
ActionScript classes
MovieClip.getNextHighestDepth()
command using the same
:
close_button
,
connect
connectionName
when you click a Button
receiving_lc
method used in
parameter in

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