To keep the playhead in a single frame:
•
In a frame behavior, type the following statement on the line after the
statement:
go to the frame
The Lingo expression "the frame" always refers to the frame currently occupied by the playhead.
This statement essentially tells the playhead to "go back to the frame you are currently in".
To create a sprite behavior (script attached to a sprite):
•
In the Score or on the Stage, select the sprite that you're attaching the behavior to. Then select
Window > Behavior Inspector and select New Behavior from the Behavior pop-up menu.
When you create a new sprite behavior, the Script window opens and already contains the line
, followed by a line with a blinking insertion point, and then a line with the word
mouseUp
This makes it easy for you to quickly attach a common behavior to the sprite.
To open a behavior for editing:
Double-click the behavior in the Cast window.
1
The Behavior inspector opens.
Click the Script Window icon in the Behavior inspector.
2
The Script window displays the behavior.
Alternatively, you can open the Script window and cycle through the scripts until you reach
the behavior.
To remove a behavior from a Score location:
•
Select the location and then delete the script from the list displayed in the Property inspector
(Behavior tab).
To attach existing behaviors to sprites or frames, do one of the following:
•
Drag a behavior from a cast to a sprite or frame in the Score or (for sprites) to a sprite on
the Stage.
•
In the score, select the sprites or frames that you're attaching the behavior to. Then
select Window > Behavior Inspector and select the existing behavior from the Behavior
pop-up menu.
To create a movie script (script attached to a movie), do one of the following:
•
If the current script in the Script window is a movie script, click the New Script button in the
Script window. (Clicking the New Script button always creates a script of the same type as the
current script.)
•
If the current script in the Script window is not a movie script, click the New Script button
and then change the new script's type with the Script Type pop-up menu in the Script tab of
the Property inspector.
•
If no sprites or scripts are selected in the cast, Score, or Stage, then open a new Script window;
this will create a new movie script by default.
388
Chapter 16
on exitFrame
on
.
end
Need help?
Do you have a question about the DIRECTOR MX-USING DIRECTOR MX and is the answer not in the manual?