Ok, heres the new box:
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']on (release)
{
if (i.text >= 0)
{
a.text = i.text
} else if (i.text < 0)
{
a.text = i.text / -1
} else if (i.text >= "a" and i.text <= "z")
{
a.text = "NaN"
} else if (i.text >= "A" and i.text <= "Z")
{
a.text = "NaN"
} else if (i.text = "")
{
a.text = "N/A"
}
}
I can't tab because internet explorer won't let me, and I don't have access to a computer with flash at the moment.
Also, to fix your problem, there are a few things I can suggest
Maybe throw in a function listener for any key that isn't a number-key to be ignored, or to list the error "NOT A NUMBER".
Or, throw in an if statement that says "If i.text is a string, not a number, then a.text = "Not A Number"." Something like that. I don't have flash in front of me, and I'm trying to work from memory.
then again, I use AS 3 so... yea.
Oh, try this for a qucik test:
Adjust the else if (i.text >= "A" and i.text <= "Z") line to else if (i.text = "A")
then, run the program and put A into the textbox and see if the dynamic posts "NaN" as the response. If ti works, let me know and change the code back. I'll work on trying to figure it out.