MACROMEDIA DIRECTOR MX-USING DIRECTOR MX Use Manual page 423

Table of Contents

Advertisement

To remove an object from actorList:
Use the
delete
Using scriptInstanceList
You can use the
scriptInstanceList
Normally,
scriptInstanceList
initializers defined in the Score. If you add child objects created from parent scripts to this list, the
child objects receive the messages sent to other behaviors.
For example, this statement adds a child object to the
add sprite(10).scriptInstanceList, new(script "rotation", 10)
This is a possible parent script that the statement refers to:
-- parent script "rotation"
property spriteNum
on new me, aSpriteNum
spriteNum = aSpriteNum
return me
end
on prepareFrame me
sprite(spriteNum).rotation = sprite(spriteNum).rotation + 1
end
When a child object is added to
property. Typically you do this from a parameter passed in to the
spriteNum
beginSprite
Note: The
Using actorList
Lingo can set up a special list of child objects (or any other objects) that receives its own message
each time the playhead enters a frame or the
The special list is
list. See
actorList
The message is the
command is used. See
updateStage
Objects in
actorList
frame. If the objects have an
handler runs each time the playhead enters a new frame or the
updates the Stage.
Some possible uses of
sprites or to update a counter that tracks the number of times the playhead enters a frame.
An
on enterFrame
handler are optimized for performance in Director. Objects in
stepFrame
more efficiently to
after an
updateStage
To add an object to the actorList:
Use the statement
command to delete the item from the list. See
property to dynamically add new behaviors to a sprite.
is the list of behavior instances created from the behavior
scriptInstanceList
message is not sent to dynamically added child objects.
, which contains only objects that have been explicitly added to the
actorList
in the Lingo Dictionary.
message that is sent only when the playhead enters a frame or the
stepFrame
on stepFrame
receive a
stepFrame
on stepFrame
and
actorList
stepFrame
handler could achieve the same results, but the
messages than to
stepFrame
command.
add the actorList
scriptInstanceList
, you must initialize the child object's
command updates the Stage.
updateStage
in the Lingo Dictionary.
message instead of an
handler available, the Lingo in the
updateStage
are to animate child objects that are used as
messages or custom messages sent
enterFrame
,
.
theObject
in the Lingo Dictionary.
delete
property of sprite 10:
handler.
on new
message at each
enterFrame
on stepFrame
command
property and
actorList
respond
actorList
Writing Scripts with Lingo 423
on

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Director mx

Table of Contents