Hi,
I have a label sprite (text: 1000m) and I would like to count it down and update the text of the label. Inside onLoad() I have schedule(countdownFunc, 1); so it calls the countdown function every 1 second. And the countdownFunc is something like this:
countdownFunc: function (dt) {
this.distanceLabel.setString(parseInt(this.distance -= 1) + "m");
},
where
this.distanceLabel = the node label;
this.distance = 1000;
but I’m getting an Uncaught TypeError: this.distanceLabel.setString is not a function.
Any ideas? Thanks!