MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Use Manual page 288

Hide thumbs Also See for DIRECTOR MX 2004-USING DIRECTOR:
Table of Contents

Advertisement

Sending messages to specific behaviors only
The
method sends an event to specific behaviors. Unlike the
call
method does not pass the message to frame scripts, scripts of the cast member, or movie scripts.
Before sending a message to a specific behavior, check the
to find a behavior script reference to use with the
The
scriptInstanceList
sprite while a movie is playing.
For example, this handler displays the list of references for all behaviors attached to the same
sprite as this behavior's handler:
--Lingo syntax
on showScriptRefs me
put sprite(me.spriteNum).scriptInstanceList
end
// JavaScript syntax
function showScriptRefs() {
trace(sprite(spriteNum).scriptInstanceList);
}
This handler sends the message
method identifies the first script reference in the
getAt
--Lingo syntax
on mouseDown me
xref = getAt(sprite(1).scriptInstanceList, 1)
call (#bumpCounter, xref, 2)
end
// JavaScript syntax
function mouseDown() {
xref = sprite(1).scriptInstanceList.getAt(1);
bumpCounter (xref, 2);
}
Note: The symbol (
To remove all instances of a sprite while the movie is playing:
Set the sprite's
about this property, see the Scripting Reference topics in the Director Help Panel.
288
Chapter 12: Behaviors
property provides a list of references for the behaviors attached to a
bumpCounter
) operator must precede the message in the
#
scriptInstanceList
scriptInstanceList
method.
call
to the first script reference attached to sprite 1 (the
scriptInstanceList
property to an empty list([]). For more information
method, the
sendSprite
sprite property
):
method.
call
call

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents