In my scene, I have a dynamic text box (instance name = life).
In my ActionScript, I created a numerical variable called livesnum. And then under this, I set the value of the text fields as the livesnum variable, but I get the following error:
1067: Implicit coercion of a value of type Number to an unrelated type String.
My ActionScript is as follows:
var livesnum:Number = 4;
lives.text = livesnum;
How would I achieve setting a text field as a numeric value to a variable?
source
share