Creating Animated Rollover buttons

http://www.kirupa.com/developer/flash5/animatedrollover.htm

Hi!

I just finished the above tutorial, albeit in Flash MX 2004.

I could make the effect, (I could see it when I pushed “play movie”) but could not get it to happen on rollover. I assume this is an actionscript thing, could anyone walk me through it?

Thank you!

Ok, I’m back!

Here’s the .fla. Hope you can help me figure the problem out. On a related not I’ve noticed that my cursor kind of acts figgity when mousing over my button in general. It’s as if flash can’t tell when I’m over a button or which button I’m over. I’ve done something wrong. :hurt:

Thanks for your help!

Save the file for Flash MX.

Absolutely! Sorry about that…

Tell me if there’s a problem with the new one…winzip was acting angry.

:huh:

Okay, so I don’t know what I’m supposed to be looking at… I did, however, look at the “Slideshow” MC/Button, was that the right one?

I added the rollOvers and for some reason it wouldn’t work when I previewed the movie, don’t know what that was about.

Yes, the “slideshow” button is the one I applied the tutorial to. Hmmm, I wonder why it isn’t working? Did you see that if you “play movie” you can see it pulsate?

Anyone else want to try?

Here’s an example of one I got to work roll-over wise, but see how it’s hard to get it to go? The space in say, the capital letter “D” is just empty space as far as my pointer is concerned. I don’t get it.

Got your problem. First of all, your actionscript is all wrong. We’ll get back to that. However, your other problem is that you have an unneccessary keyframe. When it passes over that keyframe, the mc reverts to its normal position (stopped at frame 1). So, delete that by right-clicking the frame and selecting “clear keyframe”. Then, you need to change your actionscript. Put this code in the actual movieclip:

 on (rollOver) {
_root.slideshow.gotoAndPlay(2);
}

. Put this code in the first frame of the movieclip:

stop()

. Right-click the second frame in Layer 2 and select “Convert to keyframe”. Now, in the last frame (frame 15), put in this actionscript:

gotoAndStop(1)

.

I hope this helped your problem.

If you happen to be lazy, the fixed file is here. I suggest, however, that you follow the steps to help you learn.

Thank you so much! I will try and do it on my own!

I’ll let you know if anything weird happens.

I don’t 3dengine is what you wanted to attach.

Well, I’m getting closer, maybe? Now it does the animation at the start, once, then no rollover. I want it to loop while your mouse is over it. Oh yeah, and for me at least my mouse still acts silly over it.

Here’s what I’ve done so far.

Sorry. On your example, you renamed the actionscript to slideshowbutton, so you would need to change that in the main frame. (go from slideshow to slideshowbutton). Since you want it to loop, delete the code in the first frame and put this code in the last frame:

if (this.hitTest( _root._xmouse, _root._ymouse, false)){
gotoAndPlay(1)}else{
gotoAndStop(1)}

Don’t really want to explain. Sorry

EDIT: Also, I’d suggest putting a rectangular background with an alpha of 0 below it so it is easier to rollover and click on it.