How would you go about making a button that plays an MC when you move your mouse off the button? For example, I have a button that scales up when you hover it, so how would I make it scale down when I move off the button?
The button symbol doesn't have a rollout key, so I'd have to actionscript it in the scene to roll out. But what do I call up when I tell it to do something on rollout?
Thing is....I can't add that script to a movieclip, it won't let me do mouse functions on movieclips. And if I make it a button, there's no mouseoff keys.
If you go back to Dave's earlier suggestion you should be able to get this working.
The trick is not to think of this as purely a button exercise. Here's the breakdown.
What you need is something which looks like a button but is actually a movieClip - create it with three stages: normal display, rollOver, rollOut (i.e. the three different graphics or animations you want to show, they can be any amount of frames in length). Label each section so you have something to target later on.
Add a layer to the movieClip above the animation layer an place an invisible button in this layer directly over the clip. If you haven't made one of these before just place a shape in the "hit" frame but leave the rest blank -it shows as a semi-transparent shape when you place it on the stage but is invisible in the movie. It still can be scripted as a button though...
Now back to where Dave was - adding actions to the button which trigger your movieclip.
Awesome! That was it! The invisible button was what I had to have to complete it. That's what allowed me to put some mouse functions on the button, and at the same time have it animate both rolling in and out. Thanks a lot for all your help!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.