Rollover states?

Hi Everyone

Trying to get my buttons/MC to behave like

http://www.wddg.com/johnmarksorum/jms_photographer.asp

how are these chaps getting the “button” to play out like that once the mouse moves off the “button”?

I tried making a MC but the movieclip gets stuck sometimes if I move my mouse really quickly over it.

Suggestions would be much appreciated

RYU

movieclip is the right idea, if you are having problems with it getting stuck like that try increasing your frames per second some.

Hi Sorcerer,

I tried that already and that didn’t seem to make any difference. I still get instances when the MC gets stuck.

Any other ideas?

Thnxs

RYU

The only other thing I can think to do is to use a function onEnterFrame which constantly checks the mouse position and if it isn’t over the button and use a variable to identify what state your movieclip being used as a button is in. Then if you aren’t over the button and the MC is in the over state make it play.

Sorcerer: I’ll try that.

I tried something along those lines earlier today - created a function that traced the mouse position, and based on the position I would get the mc object to do something, but I just found it quite slow - I’ll try and optimize the script, maybe that works…

Thanks a million Buddy!

Later

RYU

There is still a good chance it will bog down your movie because you are constantly running that script and checking the mouse positions. I’ve had this problem before but increasing the framerate to about 30 has seemed to pretty much eliminate it.

Edit: If you start your function to check the location at the start of your over animation or on the frame and then delete it on the first frame of your rollOut animation it shouldn’t slow things down too much.

what you might use instead of having a button is creating a hitTest function between an MC and the mouse, which means the pseudo-button will be told to play the animation inside when the mouse meets the MC…

tell me if you need an example or search the forums for the hitTest function - believe me it’s worth checking it out…

HI MLK Design

I’ll have a look in the libraries, but the more examples the better - If you could let me spy some ideas I’d greatly appreciate it!

Ta

RYU