Hey..
Has anybody successfully used hitTest method 2 with a dynamically created mc?
syntax:
dynamicMovieClip.hitTest(x,y,true)
Or has anybody had problems trying it in the past?
Just wondering...
Printable View
Hey..
Has anybody successfully used hitTest method 2 with a dynamically created mc?
syntax:
dynamicMovieClip.hitTest(x,y,true)
Or has anybody had problems trying it in the past?
Just wondering...
the x, y values used with hittest MUST be global ie relative to _root. if your mc (who's position your testing) is within another mc then you need to make the co-ordinates global. you can do this by using localToGlobal();
code:
var p = { x:0, y: 0 };
localToGlobal(p);
make sure this code is executed WITHIN the mc you want to get the co-ordinates of.
Oooh that could be it.
I'll check it out.
Yeah cheers. It was a scope problem.
It's happened a couple of times before but always with dynamic mc's. Not sure why it happened before, but this time it was just mouse coordinates not globalised.
Thanks.