MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 689

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

SimpleButton.click
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
Usage 1:
on(click){
...
}
Usage 2:
listenerObject = new Object();
listenerObject.click = function(eventObject){
...
}
buttonInstance.addEventListener("click", listenerObject)
Description
Event; broadcast to all registered listeners when the mouse is clicked (released) over the button or
if the button has focus and the Spacebar is pressed.
The first usage example uses an
component instance. The keyword
refers to the component instance. For example, the following code, attached to the Button
component instance
Output panel:
on(click){
trace(this);
}
The behavior of
button symbol. In that situation,
example, the following code, attached to the button symbol instance
to the Output panel:
on(release){
trace(this);
}
Note: The built-in ActionScript Button object doesn't have a
is
.
release
handler and must be attached directly to a Button
on()
this
myButtonComponent
is different when used inside an
this
this
, used inside an
on()
, sends "_level0.myButtonComponent" to the
handler attached to a regular Flash
on()
refers to the Timeline that contains the button. For
click
handler attached to a component,
, sends "_level0"
myButton
event; the closest event
SimpleButton class
689

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents