Return to Snippet

Revision: 52995
at November 9, 2011 10:26 by scruffpuff


Initial Code
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!!!");
			}

Initial URL

                                

Initial Description

                                

Initial Title
Checking if a click occurred outside a DisplayObject

Initial Tags

                                

Initial Language
ActionScript 3