Creating Interactivity And Visual Effects - MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

Creating interactivity and visual effects

To create interactivity and other visual effects, you need to understand the following
techniques:
"Creating a custom mouse pointer" on page 566
"Getting the pointer position" on page 567
"Capturing keypresses" on page 569
"Setting color values" on page 572
"Creating sound controls" on page 573
"Detecting collisions" on page 576
"Creating a simple line drawing tool" on page 578
Creating a custom mouse pointer
A standard mouse pointer is the operating system's on-screen representation of the position of
the user's mouse. By replacing the standard pointer with one you design in Flash, you can
integrate the user's mouse movement within the SWF file more closely. The sample in this
section uses a custom pointer that looks like a large arrow. The power of this feature, however,
is your ability to make the custom pointer look like anything—for example, a football to be
carried to the goal line or a swatch of fabric pulled over a chair to change its color.
To create a custom pointer, you design the pointer movie clip on the Stage. Then, in
ActionScript, you hide the standard pointer and track its movement. To hide the standard
pointer, you use the
hide()
method) in the ActionScript 2.0 Language Reference).
To create a custom pointer:
1.
Create a movie clip to use as a custom pointer, and place an instance of the clip on
the Stage.
2.
Select the movie clip instance on the Stage.
3.
In the Property inspector, type cursor_mc in the Instance Name text box.
566
Creating Interaction with ActionScript
method of the built-in Mouse class (see hide (Mouse.hide

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents