
Navigation behaviors 21
Sound behaviors
Behaviors in the Sound library control how linked sound files are played.
To start, pause, or stop playing a sound, you use the Play Sound, Pause Sound, and Stop Sound
behaviors. You can attach the behavior to a sprite, the Stage, or a frame (in the script channel of
the Score). When attached to a frame, the behavior is triggered when the playhead enters or leaves
the frame. When attached to a sprite, the behavior is triggered by the beginning or end of the
sprite, or by mouse events.
Play Sound plays a linked sound file in a specified sound channel. If the sound channel contains
a sound that has been paused by the Pause Sound behavior, the sound resumes playing from
where it was paused. Otherwise, it plays from the beginning. You can attach this behavior to a
graphic sprite or to a sprite that contains a linked sound file.
Pause Sound pauses a sound that is playing in the specified sound channel. To begin playing a
sound or to resume a paused sound, use the Play Sound behavior.
Stop Sound stops a sound that is playing in the specified sound channel.
Sound Beep plays the system beep when the user clicks a graphic sprite.
Channel Volume Slider turns a graphic sprite into a sliding control that controls the volume of
a sound.
Channel Pan Slider turns a graphic sprite into a sliding control that controls the pan of a sound
from left to right.
Navigation behaviors
The Navigation library includes behaviors that move the playhead, open new movies, pause a
movie, and make the playhead return to previous locations. You can view more information about
a particular navigation behavior, including parameters and dependencies, if appropriate, by
dragging a behavior to the Cast window, selecting it, and displaying the Behavior inspector
(Window > Behavior Inspector).
Go Loop moves the playhead back to the nearest marker when the user clicks the sprite.
Go Next Button moves the playhead to the next marker when the user clicks the sprite.
Go Previous Button moves the playhead to the previous marker when the user clicks the sprite.
Go to Frame X Button moves the playhead to the specified frame when the user clicks the sprite.
Go to URL opens the specified URL in a browser when the user clicks the sprite.
Hold on Current Frame loops the playhead in the current frame until another behavior sends the
playhead to a new location.
Loop for X Seconds plays the current frame for the specified number of seconds.
Play Done returns the playhead to where the most recent Play command was issued. Attached to
a sprite, the behavior moves the playhead when the user clicks the sprite (on mouseUp). Attached
to a frame, the behavior moves the playhead when the playhead leaves the current frame (on
exitFrame).
Comentarios a estos manuales