Now let us see how scripts and behaviors change this process. Frame events, such as start of frame, end of frame. User events, such as mouse clicks, mouse movements, key strokes. One can associate scripts with these events. Thus whenever such an event occurs, the associated routine is executed.
Director provides a powerful application framework.
Furthermore it is possible that scripts generate custom events which can be sent to sprites, frames or movies. For example, take a select button that changes its appearance while being pressed in order to give the user some visual feedback. MouseDown - the user presses the left mouse button. MouseUp - the user releases the left mouse button. MouseLeave - the mouse pointer leaves the area of the sprite.