How can I know if a point is contained inside of an Sprite in Flex?
For example:
// My example point
var A:Point = new Point(5,5);
// My example sprite
var s:Sprite = new Sprite();
s.graphics.lineStyle(1,0x000000,1);
s.graphics.moveTo(0,0);
s.graphics.lineTo(100,100);
The point A belong to sprite s because its position is inside of it. Is there any function to know it?
I want to do it for all kind of sprites, so use math formulas to calculate linear or quadratic equations (line, circle, rectangle, etc) is not valid for me.
Thanks in advance
You can use the function
hitTestPoint(x, y)onSprite