Reset a numeric variable in As3
I have a script for a counter that I increment from a button,
the script is:
var MyCounter:Number = 0;
Inside a button script:
.....bla bla ...
MyCounter = MyCounter + 1;
MyText.text = MyCounter.toString();
When I restart MyCounter from 0
I try:
var MyCounter:Number = 0;
if MyCounter was 4 it follow with 5 and so on.
Which is the syntax to reset the var in as3?
Thanks.
