5/5/11

The Types of Behavior of Symbols in Macromedia Flash

  • Pressing and Releasing the Left Mouse Button

    • Flash Symbols can detect clicks of the mouse, and can distinguish between the mouse button being pressed and released. For Movie Clips and Buttons, this allows behavior to be assigned to user controls, and to implement application logic if a Flash project requires it. The ability to distinguish between pressing and releasing allows tailoring of the appearance of Symbols in each state.

    Dragging

    • Clicking and dragging of Symbols in Flash can be carried out by detecting the mouse button being pressed and then released. To implement dragging of a Symbol, an Event Listener can be attached to detect clicking on the Symbol, and code set up to follow the movement of the mouse and match the position of the Symbol to it.

    Rolling the Mouse On and Off

    • Flash Symbols are able to detect the mouse cursor being rolled over them, distinguishing between rolling on and off. This allows the appearance of Movie Clips and Button Symbols to be set for each of these states. Detecting the mouse rolling over a Symbol can enhance usability, as it indicates to the user that he is hovering over a user control.

    Double Clicks

    • Double clicks of the left mouse button can be detected by Symbols in Flash. This feature is particularly useful for Flash projects that involve an application with complex behavior. Double click detection can be applied to Symbols including Movie Clips and Buttons in cases where behavior has to be different to what happens with a single click.

    Right Clicks

    • Right mouse button clicks can be detected using ActionScript if a Flash application needs to tailor what happens when this event occurs. Right clicking is not a commonly used function in Flash, and should only be used in exceptional circumstances.

  • No comments: