 				textFieldShadow.text = hostComponent.label;
 			}
 		}
-//		
-//		override public function getExplicitOrMeasuredWidth():Number
-//		{
-//			if(hostComponent != null)
-//				return textField.textWidth + 20;
-//			
-//			return bgImg.width;
-//		}
-//		
-//		override public function getExplicitOrMeasuredHeight():Number
-//		{
-//			return bgImg.height;
-//		}
 		
 		override protected function measure():void
 		{

			else
				alpha = 1;
		}
		
		//////////////////////////////////////////
		// Methods
		//////////////////////////////////////////
		
		override protected function createChildren():void
		{
			// Set up text fields only if we have a hostComponent
			if(hostComponent != null) {
				var tf:TextFormat = new TextFormat;
				
				textField = new TextField();
				textFieldShadow = new TextField();
				
				tf.align = "center";
				tf.color = getStyle("color");
				tf.font = getStyle("fontFamily");
				tf.size = getStyle("fontSize");
				tf.bold = getStyle("fontWeight") == "bold";
				textField.defaultTextFormat = tf;
				tf.color = 0x000000;
				textFieldShadow.defaultTextFormat = tf;
				textFieldShadow.alpha = .20;
				
				addChild(textField);
				addChild(textFieldShadow);
			}
			
			if(_currentState == "down" ) {
				if(bgImg != null) {
					removeChild(bgImg);
				}
				bgImg = new Button_bg_down();
			}
			else {
				if(bgImg != null) {
					removeChild(bgImg);
				}
				bgImg = new Button_bg_up();
			}
			
			if(bgImg != null) {
				addChild(bgImg);
			}
		}
		
		override protected function commitProperties():void
		{
			if(hostComponent != null) {

			
			_currentState = value;
			
			applyFXG();
		}
		
		//////////////////////////////////////////
		// Methods
		//////////////////////////////////////////
		
		override protected function createChildren():void
		{
			// Set up text fields only if we have a hostComponent
			if(hostComponent != null) {
				var tf:TextFormat = new TextFormat;
				
				textField = new TextField();
				textFieldShadow = new TextField();

				tf = setTextFormat(tf);
				
				textField.defaultTextFormat = tf;
				tf.color = 0x000000;
				textFieldShadow.defaultTextFormat = tf;
				textFieldShadow.alpha = .20;
				
				addChild(textField);
				addChild(textFieldShadow);
			}
			
			applyFXG();
		}
		
		override public function styleChanged(styleProp:String):void {
			// TODO: Refactor to check whether styleProp is one of three following value types and update 
			// the styles accordingly:
			// 1) Individual style name (e.g. "fontSize"). 2) "styleName". 3) null. 
			// If 1) reset only individual style. If 2) or 3), reset all styles
			
			// Only deal with text if a hostComponent exists and text fields are not empty
			if(hostComponent != null && textField != null && textFieldShadow != null) {
				var tf:TextFormat = textField.defaultTextFormat;

				tf = setTextFormat(tf);
				
				textField.setTextFormat(tf);
				tf.color = 0x000000;
				textFieldShadow.setTextFormat(tf);
				textFieldShadow.alpha = .20;
			}
			super.styleChanged(styleProp);
		}

		private function setTextFormat(tf:TextFormat):TextFormat {
			tf.align = "center";
			tf.color = getStyle("color");
			tf.font = getStyle("fontFamily");
			tf.size = getStyle("fontSize");
			tf.bold = getStyle("fontWeight") == "bold";
			
			return tf;
		}
		
		private function applyFXG():void {
			if (_currentState == "down") {
				if(bgImg != null) {
					removeChild(bgImg);
				}
				bgImg = new Button_bg_down();
			}
			else {
				if (!(bgImg is Button_bg_up)) {
					if(bgImg != null) {
						removeChild(bgImg);
					}
					bgImg = new Button_bg_up();
				}
			}
			
			if(bgImg != null) {
				addChild(bgImg);
				invalidateDisplayList();
			}
			
			if(_currentState == "disabled") {
