 		protected function removeFrameListener():void
 		{
 			if (!m_frameListenerActive) return;
-			var animationActive:Boolean = m_thumb.left != valueToPosition(m_value, m_minValue, 
+			var animationActive:Boolean;
+			if(m_direction == DIRECTION_HORIZONTAL)
+			{
+				animationActive = m_thumb.left != valueToPosition(m_value, m_minValue, 
 				m_maxValue);
+			}
+			else
+			{
+				animationActive = m_thumb.top != valueToPosition(m_value, m_minValue, 
+				m_maxValue);
+			}
 			if (animationActive || m_isDragging) return;
 			removeEventListener(Event.ENTER_FRAME, self_enterFrame);
 			m_frameListenerActive = false;

					removeFrameListener();
				}
			}
			m_thumb.left = m_statusBar.width = pos;
		}
		
		protected function valueToPosition(value:Number, dataMin:Number, dataMax:Number):Number
		{
			var pos:Number = (width - m_thumb.width) / 100 * ((value - dataMin) / 
				((dataMax - dataMin) / 100));
			pos = Math.max(0, pos);
			pos = Math.min(width - m_thumb.width, pos);
			return Math.round(pos);
		}
		
		protected function positionToValue(pos:Number):Number
		{
			pos = Math.max(0, pos);
			pos = Math.min(width - m_thumb.width, pos);
			return pos / ((width - m_thumb.width) / 100) * 
				((m_maxValue - m_minValue) / 100) + m_minValue;
		}
		
		protected function applyCurrentDragValue():void
		{
			setValue(positionToValue(m_dragStartThumbPosition + 
				(m_track.mouseX - m_dragStartMousePosition)));
			applyValue();
		}
		

		
		protected function thumb_click(e:MouseEvent):void
		{
			if(m_direction == DIRECTION_HORIZONTAL)
			{
				m_dragStartThumbPosition = m_thumb.left;
				m_dragStartMousePosition = m_track.mouseX;
			}
			else
			{
				m_dragStartThumbPosition = m_thumb.top;
				m_dragStartMousePosition = m_track.mouseY;
			}
			m_isDragging = true;
			addFrameListener();
		}
