Example
This handler accepts a sprite reference and toggles the sprite's
or off.
-- Lingo syntax
on ToggleButtons(whichSprite)
sprite(whichSprite).buttonsEnabled = \
not(sprite(whichSprite).buttonsEnabled)
end
// JavaScript syntax
function ToggleActions(whichSprite) {
sprite(whichSprite).buttonsEnabled = !(sprite(whichSprite).buttonsEnabled);
}
See also
actionsEnabled
buttonStyle
Usage
-- Lingo syntax
_movie.buttonStyle
// JavaScript syntax
_movie.buttonStyle;
Description
Movie property; determines the visual response of buttons while the mouse button is held down.
Read/write.
This property applies only to buttons created with the Button tool in the Tool palette.
The
buttonStyle
•
0 (list style: default)—Subsequent buttons are highlighted when the pointer passes over them.
Releasing the mouse button activates the script associated with that button.
•
(dialog style)—Only the first button clicked is highlighted. Subsequent buttons are not
1
highlighted. Releasing the mouse button while the pointer is over a button other than the
original button clicked does not activate the script associated with that button.
Example
The following statement sets the
-- Lingo syntax
_movie.buttonStyle = 1
// JavaScript syntax
_movie.buttonStyle = 1;
674
Chapter 14: Properties
property can have these values:
buttonStyle
buttonsEnabled
property to 1:
property on
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers