MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 691

Director scripting reference
Table of Contents

Advertisement

Example
This script checks to see if the sprite, which is specified with an ink effect of Background
Transparent, is currently set to be rendered direct to Stage. If the sprite is not rendered direct to
Stage, the sprite's
Flash movie sprites that are rendered direct to Stage), the sprite's
.
#boundingBox
-- Lingo syntax
property spriteNum
on beginSprite me
if sprite(spriteNum).directToStage = FALSE then
sprite(spriteNum).clickMode = #opaque
else
sprite(spriteNum).clickMode = #boundingBox
end if
end
// JavaScript syntax
function beginSprite(me){
var dts = sprite(this.spriteNum).directToStage;
if (dts = 0) {
sprite(this.spriteNum).clickMode = symbol("opaque");
} else {
sprite(this.spriteNum).clickMode = symbol("boundingBox");
}
}
clickOn
Usage
-- Lingo syntax
_mouse.clickOn
// JavaScript syntax
_mouse.clickOn;
Description
Mouse property; returns the last active sprite clicked by the user. Read-only.
An active sprite is a sprite that has a sprite or cast member script associated with it.
When the user clicks the Stage,
with no script, you must assign a mouse event script to it so that it can be detected by
For example:
-- Lingo syntax
on mouseUp me
...
end
Buttons, check boxes, and radio buttons are detected by
attached to them.
The
property can be checked within a loop. However, neither
clickOn
change value when the handler is running. The value that you obtain is the value from before the
handler started.
is set to
clickMode
#opaque
clickOn
. Otherwise (because ink effects are ignored for
returns 0. To detect whether the user clicks a sprite
clickOn
is set to
clickMode
even if there is no script
nor
clickOn
clickLoc
clickOn
.
clickOn
691

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

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

This manual is also suitable for:

Director mx 2004

Table of Contents