Hi again guys,
Sorry to post another thread. I’m followings tutorials on displaying/updating score etc. But for some reason my scores and lives are not displaying? My score textfield is “_score” and my lives textfield is “_lives”. Code is as follows:
public class Main extends MovieClip
{
//Declare properties
public var score:uint;
public var lives:uint;
public var _ball:ball;
public const GRAVITY:Number = 2;
public const BOUNCE_FACTOR:Number = 0.8;
public const HIT_FORCE:Number = 20;
private var _vx:Number;
private var _vy:Number;
public function Main()
{
init();
}
private function init():void
{
//initialise properties
score = 0;
lives = 5;
//update score/lives
_score.text = score.toString();
_lives.text = lives.toString();
…
Any suggestions?
Cheers,