EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 706

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...
706 Chapter 14: Properties
Example
This statement removes a constraint sprite property:
-- Lingo syntax
sprite(5).constraint = 0
// JavaScript syntax
sprite(5).constraint = 0;
This statement constrains sprite (i + 1) to the boundary of sprite 14:
-- Lingo syntax
sprite(i + 1).constraint = 14
// JavaScript syntax
sprite(i + 1).constraint = 14;
This statement checks whether sprite 3 is constrained and activates the handler showConstraint
if it is:
-- Lingo syntax
if (sprite(3).constraint <> 0) then
showConstraint
end if
// JavaScript syntax
if (sprite(3).constraint != 0) {
showConstraint();
}
See also
locH, locV, Sprite
controlDown
Usage
-- Lingo syntax
_key.controlDown
// JavaScript syntax
_key.controlDown;
Description
Key property; determines whether the Control key is being pressed. Read-only.
This property returns
TRUE if the Control key is being pressed; otherwise, it returns FALSE.
You can use
controlDown together with the key property to determine whether the Control key
is being pressed in combination with another key. This lets you create handlers that are executed
when the user presses specified Control key combinations.
Control or key equivalents for the Director authoring menus take precedence while the movie is
playing, unless you have installed custom Lingo or JavaScript syntax menus or are playing a
projector version of the movie.