Example
The following frame script checks whether the Flash movie sprite in the sprite the behavior was
placed in is playing and, if so, continues to loop in the current frame. When the movie is finished,
the sprite rewinds the movie (so the first frame of the movie appears on the Stage) and lets the
playhead continue to the next frame.
-- Lingo syntax
property spriteNum
on exitFrame
if sprite(spriteNum).playing then
_movie.go(_movie.frame)
else
sprite(spriteNum).rewind()
_movie.updatestage()
end if
end
// JavaScript syntax
function exitFrame() {
var plg = sprite(this.spriteNum).playing;
if (plg = 1) {
_movie.go(_movie.frame);
} else {
sprite(this.spriteNum).rewind();
_movie.updatestage();
}
}
rollOver()
Usage
-- Lingo syntax
_movie.rollOver({intSpriteNum})
// JavaScript syntax
_movie.rollOver({intSpriteNum});
Description
Movie method; indicates whether the pointer (cursor) is currently over the bounding rectangle of
a specified sprite (
The
rollOver()
perform an action when the user places the pointer over a specific sprite.
If the user continues to roll the mouse, the value of
running a handler, and can result in unexpected behavior. You can make sure that a handler uses a
consistent rollover value by assigning
When the pointer is over an area of the Stage where a sprite previously appeared,
occurs and reports the sprite as still being there. Avoid this behavior by not performing rollovers
over these locations, or by moving the sprite above the menu bar before removing it.
Parameters
Optional. An integer that specifies the sprite number.
intSpriteNum
512
Chapter 12: Methods
or 1) or not (
TRUE
FALSE
method is typically used in frame scripts and is useful for creating handlers that
rollOver()
or 0).
can change while a script is
rollOver()
to a variable when the handler starts.
still
rollOver()
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