Hi,
hitTestPoint works fine in my application until the application is scaled. I’m hoping that someone can explain where I’ve gone wrong. In the following details the ‘source’ is a sprite being dragged over the ‘target’.
Display Hierarchy:
stage
frame [ frame.swf ]
content [ content.swf ]
source & target sprites
Hit Test Pseudo-code [ content.swf ]:
var pt:Point = source.parent.localToGlobal( new Point( source.x, source.y ) );
if( target.hitTestPoint( pt.x, pt.y, true ) )
{ … }
Scaling Pseudo-code [ frame.swf ]:
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
…
scaleX = <computed scale>;
scaleY = <computed scale>;
Cheers!