Created
April 23, 2009 01:23
-
-
Save etrepum/100213 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (_level0 === undefined) { | |
/* detect AS3 container and patch MovieClip.hitTest */ | |
var realRootForReal = this; | |
MovieClip.prototype.oldHitTest = MovieClip.prototype.hitTest; | |
MovieClip.prototype.hitTest = function (x, y, shapeflag) { | |
if (arguments.length === 1) return this.oldHitTest(x); | |
var obj = {x: x, y: y}; | |
realRootForReal.localToGlobal(obj); | |
return this.oldHitTest(obj.x, obj.y, shapeflag); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment