/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var coords:Point = this.localToGlobal(new Point(this.x, this.y)); trace(stage.mouseX); if (stage.mouseX < coords.x || stage.mouseX > coords.x + this.width || stage.mouseY < coords.y || stage.mouseY > coords.y + this.height) { trace(this, "click outside!!!"); }