PDA

View Full Version : Dynamic Rollover Animation


Tredici
06-28-2006, 06:15 PM
To be honest, I'm not even sure if they're called dynamic rollovers. :| I'm a self-taught Flash 8 user, and I've never read a tutorial, so I'm not the most competent. I've picked up how to make rollover animations and how to make the inverse of the animation happen on rollout, if you know what I'm talking about.

Now, to the problem. I'm making a website in majority xHTML/CSS yet the navigation will be done in Flash 8. Basically, the design is based on a scraggy torn cardboard theme, and the navigation buttons in their normal state will be little cardboard tabs hanging out horizontally from beneath the layout.

As the tabs are rolled over, I'd like them to slide out horizontally and then expand downwards to provide space for content. Say, for example, the user rolls over the tabs for a second or two, and the tab slides only half of the way out, I'd like on roll out, for the tab to slide back in from half way out. Similarly, if it where to slide all the way out, then expand half way, on roll out, I'd like it to then retract half way and slide back in.

At the moment, I only know how for the complete inverse of the animation to happen on rollout, whereby the tab will retract and then slide back in, independent upon how far it's allowed to slide out, if you know what I mean. How can I make it dynamic whereby the tab slides back in only from the point it's allowed to animate to?

I'd really appreciate help on this matter lads. Even a link to a tutorial would really usefull. The client is as stiff as rock and refuses to have the website any other way, so for the contract, I need to know how to do this, haha. Cheers lads, I appreciate it in advance.

oldnewbie
06-28-2006, 06:34 PM
Using a hitTest on a movie clip, that plays the clip on rollover, and reverse plays it (from the point it played to...) on rollout...

As a simple example...

Attachment removed.

Tredici
06-28-2006, 06:42 PM
Yeah, that's exactly what I'm looking to do! But, how I give a movie clip a hitTest? I've looked through the .fla you've attached and I still can't quite see how it's done. Sorry, haha, but I'm pretty useless at this stuff.

oldnewbie
06-28-2006, 08:15 PM
Simply right-click the face on stage, and select Actions from the menu, to open up the Actions - Movie Clip window... That's were the script is!

Tredici
06-29-2006, 12:03 AM
Ahh that's brilliant! Thanks a lot for that! :)

oldnewbie
06-29-2006, 12:43 AM
Grrrrrrrrrreat! ;)