Hello there.
I am having trouble with some buttons I have created using movie clips.
The reason I have used movie clips is because I want a rollover, and rollout animation.
So picture this...
I have a movie clip button that has a little bit pop out of it, it all works fine. BUT, not! Because that little bit that popped out is now an active part of the button causing it to stutter should the user roll over it during it's animation.
My question is this...
Is there any way of defining a hit area for a movie clip button?
I was thinking of using a stroke and the getBounds function. But as I'm new to Flash and all this actionscript malarke I'm not shure what I would do if I used it.
Help would be much appreciated.
Thanks
Movie clip button hit area
Started by porgeet, Jun 24 2006 04:45 PM
1 reply to this topic
#1
Posted 24 June 2006 - 04:45 PM
#2
Posted 25 June 2006 - 09:24 AM
So I tried using the getBounds function. Here is what I ended up with...
I'm newish to actionscript so I don't know how to get around this problem. Or if this is indeed the right way to combat it.
Please help
Edit
Found out how to do it. There is a hitArea definition in Flash
button_mc.onRollOver = outSide;
var a = stroke.getBounds (_root);
function outSide () {
if (_xmouse<a.xMin || _xmouse>a.xMax || _ymouse<a.yMin || _ymouse>a.yMax){
delete this.onRollOver;
}
}
this.button_mc.onRollOver = function () {
button_mc.gotoAndPlay("_over");
}
this.button_mc.onRollOut = function () {
button_mc.gotoAndPlay("_out");
}- Ive made a stroke movie clip that spans the parameter of my button
- Then gave an instance name of stroke
- Placed it accordingly over my button on the root timeline
I'm newish to actionscript so I don't know how to get around this problem. Or if this is indeed the right way to combat it.
Please help
Edit
Found out how to do it. There is a hitArea definition in Flash
Edited by porgeet, 25 June 2006 - 01:25 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
