 		}
 		
 		private function shouldDrawChild(child:DisplayObject):Boolean {
-			return (!isNaN(_width) && 
+			return (
+					!isNaN(_width) && 
 					!isNaN(_height) &&
 					_width != 0 && 
 					_height != 0 && 

		private var _height:Number;
		
		public function ConstrainedSprite() {
			addEventListener(Event.ADDED, addedHandler);
		}
		
		private function addedHandler(event:Event):void {
			var child:DisplayObject = event.target as DisplayObject;
			if(child.parent == this) {
				drawChild(child);
			}
		}
		
		public function draw():void {
			drawChildren();
		}
		
		override public function set width(width:Number):void {
			_width = width;
			drawChildren();
		}
		
		override public function set height(height:Number):void {
			_height = height;
			drawChildren();
		}
		
		private function drawChildren():void {

		private function drawChild(child:DisplayObject):void {
			if(shouldDrawChild(child)) {
				var rect:Rectangle;
				
				rect = constrainedSize(child.width, child.height, _width, _height);
				child.width = rect.width;
				child.height = rect.height;
				child.x = Math.round((_width/2) - (child.width/2));
				child.y = Math.round((_height/2) - (child.height/2));
				//trace(">> drawing child with: ", child, rect, "vis", child.visible, "actual w", child.width, "actual h", child.height, "x", child.x, "y", child.y);
			}
		}

