HomeFlash Page 4 - Flash 101 (part 5): Spiralling Out Of Control
Dynamic Buttons - Flash
This week, find out why movie clip symbols are a Good Thing, andlearn to add interactivity to your Flash movies with the built-in Actions.And when you're done, use the new Flash Projector to distribute your moviesto all and sundry. Who needs Hollywood when you can just roll your own?!
By allowing authors to separate animation sequences into separate movie clip symbols, Flash makes it possible to add animation and interactivity to buttons as well.
In your existing Flash movie, create a new button symbol named "spiral-button", and insert an instance of the static graphic symbol "spiral-image" for the Up state (in symbol-editing mode). Next, insert instances of the rotating movie clip symbol "spiral-movie" for the Over and Down states. Finally, for the Hit state, draw a filled box which encloses the entire spiral - this identifies the active area of the button.
Now, each time the button symbol receives a "hover" or "click" event, it will automatically activate and play the movie clip.
Go back to the Stage, and insert an instance of your new button symbol "spiral-button". Use Control -> Test Movie to view the movie clip - you'll see something like this: