View Full Version : appear on hover
ostudioo
08-25-2008, 09:30 AM
i was wondering is there a .fla, tutorial, or help on how would I make something that will allow me to make something when users hover over a text something will appear say more text/images. im planning to add several more text that users can hover over.
ex:
TEXT1 ( hover over me )
(once mouse hovered over)
HI HI HI HI HI
TEXT2 ( hover me PLZ )
(once moused hovered over)
Hi friend
once hovered over a diff text, if there is original hovered, it will disappear and new hover will appear. if user doesn't hover over TEXT anymore, previous hover will stay.
hope you guys understand and thanks ahead of time.
ramm19
08-25-2008, 06:10 PM
There are many different way to do that, I'm attaching a little sample and also pointing you to some tutorials:
http://www.kirupa.com/developer/flash5/animatedrollover.htm
http://www.toxiclab.org/tutorial.asp?ID=22
Instead of changing colors or animating anything, you can just change the text...
in my sample you don't need to have a background, so you can make the background transparent and just use it as the "HIT" area. The text is assigned dynamically and is all set in the 1st keyframe of the movie.
I hope that helps you out. Let me know if you have any other questions.
ostudioo
08-25-2008, 10:35 PM
thanks, this is exactly what I wanted. However, do you know the ActionScript to allow the "You rolled over me" to stay until user hovers over another TEXT? Also is it possible to make layers instead of doing this all in AS? I want to add detailed images, text that I want to be aligned and appear a certain way.
Thanks.
ramm19
08-26-2008, 06:29 PM
yes to both questions:
To keep the initially rolled over text "up" until move over other text:
1) remove the onRollOut from the 1st button
2) on your onRollOver actions from your second button, add a code to take "button1" to it's initial position (for instance "button1.gotoAndStop(1)")
Probably a more efficient way to do it, is by setting a variable to track the "last" rolled over button.
And yes, you can add images to the layers, but you will still need to use actionscript to make it work.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.