At 8/20/16 06:50 PM, K3ter wrote:
when I try to set box.text = money; it tells me I can't because it is not a string.
the term is called Casting, and there's a ton of different ways.
box.text = money.toString();
almot everything in flash has a toString() function. theres also:
box.text = String(money);
Which is the generic way to cast anything to another thing, or it will do it automatically on certain type conversions
var foo:* = 55;
var bar:String = foo;
but if foo was type Number or int, you would get a compile error
and you can convert backwards using:
parseInt("5")
Number("5.4")
int("3")