The remainder of the movie clip events relate to user interaction. When any of the user-input clip events occurs, all clips on stage (no matter how deeply nested in other clips) receive the event. Hence, multiple clips may react to a single mouseclick, mouse movement, or keystroke.
To execute code based on the proximity of the mouse to a particular
clip, an event handler should check the location of the mouse pointer
relative to the clip. The built-in
function provides an easy way to check
whether a mouseclick occurred within a certain region, as shown later
in Example 10.9.
press button event, the
mouseDown clip event detects the downstroke of a
mouseDown event occurs each time
the primary mouse button is depressed while the mouse pointer is over
any part of the Stage.
Unlike the button
mouseDown is not tied to the
area of a button. In combination with the
events and the
Mouse.hide( ) method, the
mouseDown event can be used to implement a
custom mouse pointer, as we’ll see later in Example 10.8.
event is the counterpart to
mouseDown. It occurs
each time the primary mouse button is released while the mouse
pointer is over any part of the Stage. As with
mouseDown, a clip with a
mouseUp handler must be present on stage at the
time the mouse button is released in order for the event to have any