Tuesday, February 28, 2006

RECIPE FOR A NOISY BUTTON

Here - by popular request - is my recipe! Eat slowly with a double ice cream scoop.

CREATING A BUTTON WITH SOUND IN FLASH / A recipe by Judith


We will create a button that plays a sound when you roll over it. When you roll out, the sound will stop.

Create a shape then MODIFY → CONVERT TO SYMBOL → GRAPHIC (name)

INSERT → NEW SYMBOL → BUTTON (name)

Drag and drop an instance of your graphic into the UP frame. Then INSERT → TIMELINE → KEYFRAME to the over, down and hit frames.

(You can create visual changes or use different graphics, pictures or movie clips in the “up” “over” and “down” positions, to create lively effects prompted by mouse actions. And remember – by turning the alpha to zero, you can make the button invisible!)

CLICK ON “Scene 1” to return to the canvas. Drag an instance of your button from the LIBRARY onto the STAGE.

Now you will name your button. Open the property inspector WINDOW → PROPERTIES

In the INSTANCE NAME box, type a name (ActionScript relies on these names to identify objects)

Now we will add a BEHAVIOR to the button.

First, make sure the instance of your button on stage is selected.

Go to WINDOWS → DEVELOPMENT PANELS → BEHAVIORS. Click on the + sign to add a behavior → SOUND → STOP ALL SOUNDS

Click the default word “RELEASE” and change to “ON ROLL OUT”. This will make the sound stop when the cursor rolls out of the hit area.

GOOD LUCK AND HAVE FUN!

0 Comments:

Post a Comment

<< Home