
Controls behaviors 17
Controls behaviors
The behaviors in the Controls library create user interface elements for your movies. You can view
more information about a particular controls 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).
Analog Clock makes a group of three vector shape sprites function as the hands of a clock. Place
each sprite on the Stage in its 12 o’clock position and then attach the behavior. You specify
whether each shape acts as the second, minute, or hour hand. The behavior rotates each sprite
around its base when the movie plays to indicate the current time according to the system clock.
The behavior will alter a sprite’s registration point if necessary.
Display Text displays a string in a field or text sprite. This behavior waits to be activated by
another behavior or a Lingo command. Use it with the Tooltip behavior or with your own custom
behaviors. You can make the text sprite invisible until requested by another behavior and specify
its location. You can choose between two display types: tooltip and status bar.
Draw Connector enables the user to draw straight lines with the mouse. You can also control this
behavior with Lingo calls from other sprites. The default setting starts drawing a line on
mouseDown and completes the line on mouseUp. To let the user perform more sophisticated
drawing tasks, use the Paintbox behaviors (see “Paintbox behaviors”).
Dropdown List changes a field cast member into a pop-up menu. You can set parameters so
that a list is displayed in the menu and commands are executed based on the user’s menu item
selection.
The following jump behaviors work together to provide navigation-control buttons that move the
playhead back and forth between markers in the current movie or a different movie. You can
attach these behaviors to buttons you have created with other behaviors. Each of these behaviors
works with the others by referring to a global navigation list that stores visited markers.
Jump Back Button sends the playhead to previously visited markers in all movies, moving back
through the navigation list stored by the other jump behaviors.
Jump Forward Button sends the playhead through the path of visited markers previously stored
in the navigation list by the other jump behaviors.
Jump to Marker Button sends the playhead to a chosen marker in the same movie and adds the
marker to a navigation list that is referred to by all the jump behaviors. (Use Jump to Movie to
move to a marker in a different movie.)
Jump to Movie Button sends the playhead to any other movie in the same folder (or in a
subfolder of this folder) and adds the destination to the navigation list. Enter a marker name as a
parameter to move to a point other than the first frame in the new movie. (Use Jump to Marker
to move to a marker in the current movie.)
Multi-state Button switches a sprite between off and on states. You can define a different cast
member that appears when the sprite is clicked, when the pointer rolls over the sprite, or when
the pointer is elsewhere. To create a group of buttons that function as radio buttons, give each
button in a group the same ID.
Push Button sets the cast member of a sprite based on the state of the mouse (elsewhere,
rollover, mouseDown, mouseUp). This creates a button that can initiate actions in other sprites.
Kommentare zu diesen Handbüchern