Convert Input Text to Number in Actionscript 2.0

Discussion in 'Web Design and Development' started by Rodie1952, Nov 12, 2009.

  1. Rodie1952 macrumors newbie

    Nov 12, 2009
    I am a relative newcomer to Actionscript 2.0 and Flash I have created a Input test box where a student can input the answer to a mathematical equation i.e. 1+1= Input Text Box variable. The problem is when I check the correct answer to the Input Number Flash treats in Input as text not a numerical value. How do I get the input to be treated as numerical?
  2. lucidmedia macrumors 6502a

    Oct 13, 2008
    Wellington, New Zealand
    Both of the solutions *should* work for As2. The bottom method (casting) also works for As3.


  3. Rodie1952 thread starter macrumors newbie

    Nov 12, 2009
    "should" was the key word.

    Sorry, that didn't work. I should add this is inside a movieclip if that makes any difference.
  4. samwich macrumors regular

    Aug 5, 2007
  5. Ride9650 macrumors 6502

    Jun 29, 2007
    It can.

    Did you try the code on the main timeline or the timeline for the movieclip?

Share This Page