Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help make icons fade to different colors or pics when mouse-over!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Someone help! I wanna make icons that say different things. But I want the icons to do stuff like fade or switch to other colors when the mouse is pulled over on it.
how!?
elfunnio@hotmail.com
 
Create a button in Flash, see the help files to learn how to do this. In button edit mode you will have 4 frames up, over, down and hit. The over frame allows you to add graphics or animations so that when someone mouses over your button/s they will see whatever is in the over frame of your button. If you need more information on this just ask. funkymonk B-)
rod@sameplanet.co.uk

 
Make your graphic icon into a movieClip, then attach something like...

onClipEvent (enterFrame) {
if (_alpha>50 && this.hitTest(_root._xmouse, _root._ymouse,true)) {
_alpha-=5;
} else if (_alpha<100) {
_alpha+=5;
}
}


...which will fade the graphic down to 50% transparency depending on how long the mouse sits over it - when you roll off the graphic will gradually return to normal.

Changing colour can be done with the same mouse detection piece, just substitute a Color() object script for the _alpha stuff (bit more complicated but not a major problem).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top