
Button._url Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
474
|
ActionScript Language Reference
Notice that as a side effect of trackAsMenu being true, the Down state of a button is always
shown when the mouse pointer is over the button and the mouse button is down (even if
the mouse was originally pressed on another button). The button’s onRollOver() and
onRollOut() handlers, however, are not triggered unless the mouse button is up.
The
trackAsMenu property should be set the same for all buttons in a menu or other group-
based interface; otherwise, mayhem and confusion can ensue.
Example
On frame 1 of a movie, create three button instances, named b1, b2, and b3, each with
unique Up, Over, and Down states. Then attach the following code to frame 1 and choose
Control
➝ Test Movie. Click the mouse over b1 and release it over b2. Notice that b2’s
Down state is displayed, and its onRelease() handler executes.
b1.trackAsMenu = true;
b2.trackAsMenu = true;
b3.trackAsMenu = true;
b1.onRelease = b2.onRelease = b3.onRelease = release;
function release () {
trace(this._name + " released");
}
See Also
Button.onRelease, Button.onRollOver, Button.onRollOut
Button._url Property
the network address of the movie clip that contains the button
Flash 6
read-only
theButton._url
Description
The _url property represents the URL (Uniform Resource Locator)