-
why is this hitTest not working
why is this hitTest not working:
code:
ar.onPress = function() {
startDrag(ar);
}
ar.onRelease = function() {
stopDrag();
if (ar.hitTest(an)) {
trace("d");
}
}
-
.
Hi,
It does work (tested), you possibly have something named incorrectly or inside of a clip!!
-
i have a btn on my stage with an instance name of ar and then a MC on the same frame on stage with an instance name of an
how is your stage set up?
-
.
Hi,
I actually had 2 mc's on the stage, but anyway, with 1 button and 1 mc as like yours
PHP Code:
ar.onPress = function() { startDrag(this); }; ar.onRelease = function() { stopDrag(); if (an.hitTest(this)) { trace("d"); } };
Last edited by fruitbeard; 04-23-2014 at 11:43 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|