hittest in flash
hittest in flash
- Started
- Last post
- 2 Responses
- drzoom
is there anyway of using hittest or euqivalent script on anything else than rectangles (irregular shapes)?
- mac100
Hi drzoom
you need to use a shape flag
hittest
here is the code
copy and paste it on the a MC
with to frames of different colours and pu a stop action on the first frameonClipEvent (enterFrame) {
x = _root._xmouse;
y = _root._ymouse;
if (this.hitTest(x, y, true)) {
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
the true bit is the shape flag that take the shape of the MC not its bounderyshope this helps
mac-10
- drzoom0
that's it ... thanks! :)