MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 107

Components language reference
Table of Contents

Advertisement

You can also create the button and assign the icon entirely in ActionScript using the method
(you still must have already created an icon for the button
UIObject.createClassObject()
with the linkage identifier
. First drag the Button component from the
happiness)
Components panel to the current document's library, so the component appears in the library,
but not on the Stage. Then, in the first frame of the main timeline, add the following
ActionScript:
this.createClassObject(mx.controls.Button, "my_button", 1, {icon:
"happiness"});
See also
Button.labelPlacement
Button.label
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
buttonInstance.label
Description
Property; specifies the text label for a button instance. By default, the label appears centered
on the button. Calling this method overrides the label authoring parameter specified in the
Property inspector or the Component inspector. The default value is
.
"Button"
Example
With a button on the Stage with instance name
, the following code sets the label
my_button
to "Test Button":
my_button.label = "Test Button";
Button.label
107

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