Didn´t have a backup for your upload files? man… ]]>

protected static function getDrawMatrix( target:DisplayObject, hitRectangle:Rectangle, accurracy:Number ):Matrix { var localToGlobal:Point;; var matrix:Matrix; var rootConcatenatedMatrix:Matrix = target.root.transform.concatenatedMatrix; //although the following statement has an error,i love it for i's short and clever,i usually write it like this //localToGlobal = target.parent.localToGlobal( new Point( target.x,target.y) );,very stupid,haha localToGlobal = target.localToGlobal( new Point( ) ); matrix = target.transform.concatenatedMatrix; //all through the class,you set root as fundamental coordinate system,but obviously,localToGlobal use stage //as Reference Coordinate System ,when root has no offset to stage,the error was hidden,however,you just add //a statement to document class like "this.x+=50",and test patiently,you will find HitTest Class will give an imprecise return-value matrix.tx = localToGlobal.x - hitRectangle.x; matrix.ty = localToGlobal.y - hitRectangle.y; //the purpose of the following two statements:convert target.tansform.concatenatedMatrix to root-coordinate system //am i right?but you should use scale().Directly handling matrix.a or matrix.d is not the same function as scale() //when matrix.b or matrix.c is not 0(when targets rotate).i mean,only when matrix.c and matrix.b is 0,you can use //the following two statements to scale matrix,once they were not 0,the following two statements will lead error. //at most cases,the errors where hidden because rootConcatenatedMatrix.a and rootConcatenatedMatrix.d are 1,so the //following two statements do nothing ,then matrix has no change.just add a statement to document like "this.scaleX //=2",and test rotated object，you will find HitTest Class will give an imprecise return-value matrix.d = matrix.d / rootConcatenatedMatrix.d; if ( accurracy != 1 ) matrix.scale( accurracy, accurracy ); //i don't know why you use "root" as fundamental coordinate system,if you use "stage",the HitTest class will not need //to handle so many coordinate convertion,isn't it?well，i guess there must be some advantages when using "root". return matrix; }

still use “root” as fundamental coordinate system,i give a version of getDrawMatrix().

protected static function getDrawMatrix( target:DisplayObject, hitRectangle:Rectangle, accurracy:Number ):Matrix { var rootConcatenatedMatrix:Matrix = target.root.transform.matrix.clone(); var matrix:Matrix = target.transform.concatenatedMatrix.clone(); rootConcatenatedMatrix.invert(); matrix.concat(rootConcatenatedMatrix); matrix.tx = matrix.tx- hitRectangle.x; matrix.ty = matrix.ty - hitRectangle.y; if( accurracy != 1 ) matrix.scale( accurracy, accurracy ); return matrix; }

i have test this method, it will give accurate return – value when ”root“ rotate, offset, or scale, you can check it btw, when i did the collision test, i find that return – value weil be imprecise when i scale the flash player window with mouse , i guess the reason is taht window – scale may change target’s concatenatedMatrix.

best wishes.

]]>1，why use “root”，not “stage”？do they have differnce？

2，when i test a_mc and b_mc（you know they are common rect MovieClip），your class behaves perfectly，however，when rotate a_mc，it gives a result not accurate。

can i get your email，may i email you my test-swf and code in detail？

hope you will see this soon ]]>