3 Replies Latest reply on Sep 30, 2011 6:07 PM by Ned Murphy

    Input Text variable is being converted to HTML

    PCressey80

      I have an Input Text box that has a variable assigned to it.  The user is to input a number, and then it is submitted with a button that does a simple conditional if statement check.  I noticed that the if statement is constantly failing because the variable is tracing back as HTML.  The trace of the variable looks like this:

       

      <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="12" COLOR="#0066CC" LETTERSPACING="0" KERNING="0">4</FONT></P></TEXTFORMAT>

       

      The variable should simply be the number 4 without all the HTML jibberish.  The "Render text as HTML" is not on for the Input Text box.  I am completely baffled and at a complete loss... any ideas of what is happening here?!  Below is the exact code I am using...

       

      TIMELINE

      numA = random(10)

      numB = random(10)

      playerGuess = "";

      stop();

       

      BUTTON

      on(press) {

          if (playerGuess == numA + numB) {

              gotoAndStop("Correct");

          } else {

              gotoAndStop("Incorrect");

          }

      }