Hey
I'm pretty new to flash but have been making a breakout game and want to add a bit of text when a life has been lost. The code I have is;
At the moment, when a life is lost the txtLifeLost text comes up but stays in place. What I want it to do, is appear for 5 seconds but then disappear and then do the same when the next life is lost and so on.Code:if(mcBall._y >= Stage.height-mcBall._height){ //if the ball hits the bottom //then reset and lose a life lives --; txtLifeLost.text = 'Lives remaining: '+lives; ballXSpeed *= 0; //reset the ball's position ballYSpeed *= -1; mcBall._x = 280; mcBall._y = 354.4; //reset the paddle's position mcPaddle._x = 252; mcPaddle._y = 362; }
Any help?![]()




Bookmarks