PDA

View Full Version : hit area of button



dualaud
May 12th, 2005, 10:26 PM
how can i enlarge the hit area of a button when i'm over it?

i tried creating a movieclip ("mc") containing two frames;
one frame ("normal") with a button including a small hit area, and one with a button containing a larger hit area (framename="over").
when i roll over the movie clip it sucessfully changes to frame "over" with the large hit area button (from root i tell "mc" to cange to frame "over"), but in fact only up,over and down state frames are taken from the new button. the hit area is still the small one from the first frame.

basically the thing i want to achieve is, that one rolls over the button, but will have to move his mouse farer away from the overstate graphic of the button, to release it. so optically the same button, but with a larger hitarea than the one you entered when rolling over the button in the first place, so one cant accidentally get off of it too early.

thanks for your ideas,
dual

Riddler?
May 12th, 2005, 10:39 PM
Hopefully this will help you out :P.. you can change that hitarea mc to 0 _alpha and it will be invisible.. Movieclips have a bit more functionality over the button :P

dualaud
May 12th, 2005, 10:56 PM
right-on. :thumb:
i abandoned the button in the mc and choose two frames containing zeroalpha
shapes (first frame: small one, second frame: large one) and it did the trick.

then i guess i can just emulate up, over and down states with actionscript, cant i? :h:

cheers,
dual :panda:

dualaud
May 13th, 2005, 07:54 PM
:nose:

k, this doesnt work with flash 5, does it?
(found it out the hard way. had publish settings in flash mx in my example.fla set to publish flash 6 and in my real fla it was set to publish flash 5. :sigh: )

any solution for flash 5?

thanks,
dual

Riddler?
May 13th, 2005, 09:07 PM
I got into flash in the era of MX.. so I have no idea, I would say that surely it is possible, but you will need the help of someone a lil elder :)