I am coding a flash game using AS3 where the player begins with 3 lives, I want this to be displayed on the screen however it only displays the first letter "L" and no number(int Lives)
here is the relevent code (snippets)
I have a blank textbox with the name txtLives
var lives:int = 3;
txtLives.addEventListener(Event.ENTER_FRAME, updateTextFields);
function updateTextFields(event:Event):void{
var lives:int = 3;
var str:String = "Lives ";
txtLives.text = str + String(lives);
}
Any help would be great appreciated. Thanks