PDA

View Full Version : Please help me with rollovers



steven50
November 5th, 2001, 04:45 PM
Right... here's the deal.
I'm making a navagation for my site using flash, and am gonna use animated buttons.
I have my animated buttons all in place on one layer, one Keyframe.
What i wanna do is that the user rolls the mouse over the button, and then the movie goes to the frame which I want it to go, which will say something about the link.

E.g - User likes the look of "Bands" link. User puts mouse over it, and it takes the user to a frame saying about the link in a little box. User takes the mouse off the link, and it goes back to it's original form.

I hope you understand. If you don't - then I'll try and provide an in-depth analysis in a later post if you wish me to.

Thanks

Vts31
November 5th, 2001, 06:24 PM
onMouseEvent(roll over) go to which ever frame.
onMouseEvent(roll out) go back to frame 1

suprabeener
November 5th, 2001, 06:27 PM
have a variable ("loc") for storing what section you're in. say "info" is the name if the movie that contains the information that changes on rollovers.


on(rollover){
info.gotoAndStop("links");
}

on(release){
... do going to links section stuff...
_root.loc = "links";
}

on(rollout){
if(loc != "links") _root.info.gotoAndStop(loc);
}

actually, you could put that if statement in all the actions.

steven50
November 6th, 2001, 03:24 PM
I'm sorry, but I don't have a clue about Actionscipt, therefore have no idea what Variables are, and how to do them. Can you just explain how to do them, thanks

suprabeener
November 6th, 2001, 04:25 PM
we're not talking rocket science here.

variables contain information so you can access it later on, you can store anything you want in .

name = "johannos";

this way, your movie can remember things. cool!

cheers.

steven50
November 6th, 2001, 04:28 PM
So I just throw in that in the actionscript place?
name = "bands";

?

suprabeener
November 6th, 2001, 06:59 PM
yeah and then whenever you want to know what bands is you can reference it

_root.content.gotoAndStop(name);

would send the movie clip "content" to a frame that you had labeled "bands".

keep in mind that each movie holds it's own set of variables so content.name will not be the same as _root.name.

upuaut8
November 7th, 2001, 01:40 AM
AND keep in mind that the
on (release){
}
command can only be placed on a button. If you open the action script panel, to add a/s, and the onMouseEvent(); option is grey'd out, then you do not have a button selected on the stage. If you try to add code it will be placed in the frame, rather than attached to the button instance.