EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 674

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
674 Chapter 14: Properties
Example
This handler accepts a sprite reference and toggles the sprite’s buttonsEnabled property on
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 property can have these values:
• 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.
• 1 (dialog style)—Only the first button clicked is highlighted. Subsequent buttons are not
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 buttonStyle property to 1:
-- Lingo syntax
_movie.buttonStyle = 1
// JavaScript syntax
_movie.buttonStyle = 1;