| |
 |
Play
animation on rollOver
written by Chris Georgenes |
| |
| I have been asked several times how i made the
characters on the home page play on rollOver and how it goes
to a new page onClick. Believe it or not this is a very basic
use of Flash buttons and Movie Clip symbols. Below is an example: |
|
| |
- Place your animation in a movie clip if it isn't already.
If not, just select all frames and layers and go to Edit >
Copy Frames - then open up the Library Panel and from the upper
right drop down select "New Symbol..." and make sure its behavior
is set to "Movie Clip". Click "OK. You are now in "edit mode"
for that symbol. Click on frame 1 and go to Edit > Paste Frames.
Your animation should now be in your new Movie Clip. Now get
back to the main timeline and drag an instance of this
movie clip onto the stage. Position it in the upper left corner.
|
|
| |
| 2. Select the instance of the Movie Clip and press
F8 (Convert To Symbol) and give it a "Button" behavior. Click
"OK". |
|
| |
| 3. Double-click the instance of this button symbol
to enter "edit mode". You will see the movie clip now resides
in the "Up" state of the button. Using selection tool (black
arrow), select the "Over" state frame and press "F6" (Insert
Keyframe). This will copy the movie clip into the Over state
as a new instance. |
|
| 4. Position the playhead back to the Up state and
click once on the movie clip instance. In the Properties Panel
change the behavior from "Movie Clip" to "Graphic", and select
"Single Frame" from the drop down menu. This will prevent the
animation from looping during inactivity. |
|
| 5. Now all we need is a "Hit" state. The Hit state
detirmines the active area of the button on rollOver. Use the
rectangle tool to draw a shape over your animation. I often turn
on "Onion Skin" to see my graphic as reference. |
|
6. Test your movie. The animation will remain static
until you rollOver it. As long as you hold mouse over the Hit
state area, the animation will continue to loop. All that's left
now is to the getURL action on the instance of the button so
when it is clicked, the user will be taken to a new page.
simply go back to main timeline and select your button instance
on the stage. Open your Actions Panel and type in your getURL
action:
on (release) {
getURL("/myNewPage.html");
}
//substitute your webpage and proper path.
|
|
| If you have
any questions feel free to drop me an email or IM me: |
| |
|
email
me
|