Dealing with hit area of moving button

[FONT=Verdana, Helvetica, sans-serif][SIZE=2] Hi all, first post from a new user of flash cs3.

After doing some of the basic stuff, I wanted to do something which seems very simple but might be a bit tricky.
Basically I want to turn an animation into a button. Lets say it is a simple square moving from the left side to the right side of the screen. Now I would like to make that square into a button in such a way that wherever the square is at that moment, the mouse turns to the ‘over’ state, while the square just continues the animation.

But when I make a button of the animation, by making it a movieclip first and than putting that mc in all four states of my button symbol, the hit area is not updated along the animation, so it remains at frame 1. Also, when I put the mouse there, the over-state begins at frame 1 again, and not at the frame the animation was at that point.
I put this in the .fla attachment.

What I basically want to do in the end is make little figures that can get anywhere on the screen, and you can click on them wherever they are, after which their color changes.

Is that possible?[/SIZE][/FONT]

Just reverse it mate, make a button and put it in a movieclip and animate it like you did.

I can give you a FLA if you want too, but it kinda shouldnt be needed.

Ok, thanks! I got that working all right.

Just one more thing, what if I want to make a button out of a precreated animation swf, which is just a normal vector with a clear outline? Because then the animation is already there, it can’t be put after the button.
I’m asking because im making the figures with swift 3d, so the animation comes from there.

Sorry, I have no clue how to attach swfs’ or anything, I’m just a big newbie :stuck_out_tongue:

I hope someone else will help you with this mate.

Thanks for your help anyway!

What I am able to do is to go into the movieclip that is created when I import the swf, there are all the keyframes of the animation, and to make the shape into a button on every keyframe (which is on every frame). Needless to say, that is pretty cumbersome when dealing with multiple imported swf-files of 1000+ frames long.

Is there anyway to do this in actionscript?
So to assign a button class to a movieclip, which takes into account its moving state?

>>Create a button via actionscript or create a button(or MC as a button only Hitarea) only with the hitarea in the library.
>>Give it a linkage
>>Load this onto the next highest depth of your anime MC.
>>If you want to show this buttons on certain key frames, use the _currentframe of the Movieclip determine the current frame and if this is your key frame/label attach the button and do the needful action