Dyn. txt box = 0 or nothing

i have a dyn txt box and it = 500 lets say. i want it to = 0 or nothing so it has nothing in the box. i can do that, but when i add the code,

_root.score = _root.score + 10;

then it puts 10101010 in the box, instead of adding 10+10=20… look at the .fla if misunderstanding…

Try the Number function:


Flash Player 4.




expression An expression to convert to a number.




Function; converts the parameter expression to a number and returns a value as follows:

If expression is a number, the return value is expression.

If expression is a Boolean value, the return value is 1 if expression is true, 0 if expression is false.

If expression is a string, the function attempts to parse expression as a decimal number with an optional trailing exponent, that is, 1.57505e-3.

If expressionx is undefined, the return value is 0.

i have no clue what that means :\ can u define it for me or something"?

Check your flash reference for help - it’s pretty simple. You are converting your expression (_root.score) into a number and then adding 10 to it. Try experimenting! You learn more by doing! :thumb:


oh great, now i have to spend 1/2 hour + plus all the other hours i have been trying to figure it out. i just dont know any other way of doing it… if you dont want to help me ill just go away!