     private function takeValueFromTextField(trigger:Event = null):void
     {
         var inputValue:Number = Number(inputField.text);
+		
         if ((inputValue != lastValue &&
-            (Math.abs(inputValue - lastValue) >= 0.000001 || isNaN(inputValue))) || 
-            inputField.text == "" || (inputField.text && 
-           inputField.text.length != lastValue.toString().length))
+            (Math.abs(inputValue - lastValue) >= 0.000001 || isNaN(inputValue)))
+            || inputField.text == ""
+			|| (inputField.text && inputField.text.length != lastField.length))
         {
             var newValue:Number = checkValidValue(Number(inputField.text));
             inputField.text = newValue.toString();

            return;

        lastValue = _value = v;
        inputField.text = v.toString();

        if (sendEvent)
        {

                if (inputValue != lastValue &&
                    (Math.abs(inputValue - lastValue) >= 0.000001 ||
                     isNaN(inputValue)) || (inputField.text && 
                    inputField.text.length != lastField.length))
                {
                    var newValue:Number = checkValidValue(Number(inputField.text));
                    
