 	import aerys.minko.type.Signal;
 	
 	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
 	import flash.display.Graphics;
 	import flash.display.Shape;
 	import flash.display.Sprite;

			
			stage.removeEventListener(Event.ADDED_TO_STAGE, displayObjectAddedToStageHandler);
			stage.removeEventListener(Event.REMOVED_FROM_STAGE, displayObjectRemovedFromStageHandler);
			
			if (_stage3d != null)
				_stage3d.visible = false;

			if (_autoResize && displayObject.parent == stage)
				displayObject.mask = null;
		}
		
		private function getGlobalScaleX() : Number
		{
			var currentParent	: DisplayObjectContainer	= parent;
			var scale			: Number					= scaleX; 
			
			while(currentParent != stage)
			{
				scale *= currentParent.scaleX;
				currentParent = currentParent.parent;
			}
			
			return scale;
		}
		
		private function getGlobalScaleY() : Number
		{
			var currentParent	: DisplayObjectContainer	= parent;
			var scale			: Number					= scaleY; 
			
			while(currentParent != stage)
			{
				scale *= currentParent.scaleY;
				currentParent = currentParent.parent;
			}
			
			return scale;
		}
	}
}