EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 513

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...
rootMenu() 513
Example
This statement changes the content of the field cast member Message to ā€œThis is the place.ā€ when
the pointer is over sprite 6:
-- Lingo syntax
if (_movie.rollOver(6)) then
member("Message").text = "This is the place."
end if
// JavaScript syntax
if (_movie.rollOver(6)) {
member("Message").text = "This is the place.";
}
The following handler sends the playhead to different frames when the pointer is over certain
sprites on the Stage. It first assigns the
rollOver value to a variable. This lets the handler use the
rollOver value that was in effect when the rollover started, regardless of whether the user
continues to move the mouse.
-- Lingo syntax
on exitFrame
currentSprite = _movie.rollOver()
case currentSprite of
1: _movie.go("Left")
2: _movie.go("Middle")
3: _movie.go("Right")
end case
end exitFrame
// JavaScript syntax
function exitFrame() {
var currentSprite = _movie.rollOver();
switch (currentSprite) {
case 1: _movie.go("Left");
break;
case 2: _movie.go("Middle");
break;
case 3: _movie.go("Right");
break;
}
}
See also
Movie
rootMenu()
Usage
-- Lingo syntax
dvdObjRef.rootMenu()
// JavaScript syntax
dvdObjRef.rootMenu();
Description
DVD method; displays the root menu.