-
Advanced Rollover Effect
Hello. I was wondering how to make a rollover effect, where when you hover over the text, the text darkens and a picture above it changes as well.
Ex.
[ PICTURE ] <-- picture changes
Link
Link <-- 1st hover over this
Link
(if you hover over any of the links, the picture will change to a new picture)
If that makes any sence. Thanks!
-
for pix:
1) have a separate movieclip for you pictures;
2) put a picture in each frame
3) add a stop on each frame
4) label each frame, too with the name of the picture
for buttons
1) put all the "links" or buttons whereever you wish them to be
2) name the buttons in the instance name
3) add code on the main stage for each button
Code:
buttonName1.onRollOver = function
{
//1) change the picture
_parent.picturesMovieClip.gotoAndPlay("NameOfPicture1");
//2) darken my text
onEnterFrame = function()
{
black = new Color(movieClipWithTextInside);
black.setRGB(0x000000);
}
}
of course, i haven't tested this but i don't see why it shouldnt work. don't use the exact same code, tweak it a bit coz i just typed that quickly so you know how it more or less works
but, when i code i always have something wrong w/ it and it takes a bunch of trace methods to find out what is wrong. goodluck
-
Hello,
Would I use the same techique for something like
this
or
this
Thanks for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|