MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 1370

Components language reference
Table of Contents

Advertisement

Parameters
A string indicating the instance name of the object to be destroyed.
instanceName
Returns
Nothing.
Description
Method; destroys a component instance.
Example
The following example removes the TextInput instance
With a Button and a TextInput component in the current document's library, add the
following code to the first frame of the main timeline:
//Create textinput and button instances
this.createClassObject(mx.controls.TextInput, "my_ti", 1, {text:"Hello
World"});
this.createClassObject(mx.controls.Button, "my_button", 2, {label:"My
Button"});
//Shift button to be below text input
my_button.move(my_ti.left, Stage.height - my_ti.bottom);
//Create Listener Object for button click
var buttonListener:Object = new Object();
buttonListener.click = function(evt_obj:Object){
destroyObject("my_ti");
}
//Add Listener
my_button.addEventListener("click", buttonListener);
UIObject.doLater()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
componentInstance.doLater(target, "function")
1366
UIObject class
when the button is clicked.
my_ti

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents