Masking a hittest

i have this simple hittested animation, say something like mouseover = a ball zooms in from the left, mouseout = ball zooms away to the left. what can i do so that the entire ball moving animation is not an active hit area? said another way, so that only a small portion of the entire area the animation uses causes the animation to occur? thanks in advance for your help.

maybe inside the ball movie clip, make another movie clip with the area you want for the hittest, and have the hittest check that smaller mc inside the ball
hope this helps, sry if im wrong :slight_smile: lol

Set a hit area for your movie clip using AS[AS]myMovieClip.hitArea = hitArea_mc;[/AS]Where hitArea_mc is the movie clip that will act as a hit area for myMovieClip.

will attempt shortly, thanks for the quick response.

No problem :slight_smile:

No matter what I try, I can’t get it to work. I’ve put the script on the main stage and in the hittested clip. I’ve put it everyplace that I know of and I’ve altered it every way that I know how and the entire hittested animation is still acting as the hitarea.

I’ll use the same example as before.

Let’s say I create a small movie clip at the right of the screen and give it the instance name “hit_spot”. The ball hittest movie clip is given the instance name “ball_movie”. The clip “hit_spot” needs to be the hit area of “ball_movie”, instead of the defaulted entire “ball_movie” clip.

Basically, I’m just looking for exact details in how to set this up. Thanks for your help.

Someone please help.

If all you want is a ball to fly in when you rollOver the button and then fly out when you rollOut of the button, why not make the animation off of the button (or movieClip that has actions like a button) and call it when needed. It’s really simple.

Here, I made a fla for you!
:beam:

I have to say thanks to Freddythunder for making the .fla; however, it’s not what I’m looking for.

The animation must be hittested so that when the user mouseouts the ball will stop it’s action, wherever it is in it’s cycle, and return to it’s original position.

Oh Oh, I got the perfect script for you but it’s at the office. I will post it in the morning! :wink:

Actually, if I understand you, all you have to do in the fla I did before is change a couple stop(); actions around and and a couple gotoAndPlay()s here and there. Try this one out:

Here’s a better example of what is happening, and what I need to happen. In the file I uploaded, the entire clip is acting as the hit area. I need the hit area to be only the button.

If anyone can alter this .fla to do that, I will cry like a little girl.

Thank you.

see the .swf here

Okay buddy, I got it done for you. I still think using buttons is better, but that just me I guess. I had to change your button into a movieClip so your onClipEvents would work - therefore - Your useHandCursor command will not work because there are no button commands on the movieClip, it’s a hitTest. Therefore, Flash doesn’t know when to use the hand cursor. Otherwise, it works. :beam:

Oh yeah, now you cry like a little girl…:*( :stuck_out_tongue:

I love you.
That is all I can really say right now.

Thank you so much.

No prob…
BTW - in hind sight, if you really want the hand to show up, you could put an invisible button (a button with only a ‘hit’ state specified) and apply your actual button actions to either the button or the movieClip - whatever ya want.

I’m glad you love me…Errrr…:stuck_out_tongue: