1 Reply Latest reply on Apr 23, 2008 10:03 AM by kglad

    Problems with numbers and validation

    viggieuk
      Does anyone know where I can get a good tutorial on dealing with numbers in flash.

      I have a series of text fields where a user can enter their income and outgoings. I have used restrict ="0-9\\." So the users can only enter numbers and decimal points. However this doesn't stop them writing more than one decimal point, so they can write 12........1 or 12.1 or 12.12.12.12.12. etc. This is having really odd effects when I add the text fields up and use math.round etc.

      Basically I want to restrict the text fields to valid UK currency and then add them up and display the totals as currency to two decimal places eg £12.50 etc.

      Thanks