Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9206459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:10:49+00:00 2026-06-18T00:10:49+00:00

I am coding a flash game using AS3 where the player begins with 3

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:10:50+00:00Added an answer on June 18, 2026 at 12:10 am

    Make sure your font is embedded on the text field by selecting the text field, then on the properties tab in the character section press the “Embed …” button. Verify that the character sets you want are all checked.

    enter image description here

    Also in your function you can simplify it to:

    function updateTextFields(event:Event):void
    {
         txtLives.text = "Lives " + lives;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a small game a while back in Flash that I'm now re-coding
How do I zip and unzip files using as3 in Air. I am coding
I have a java script code and I want to check if flash player
I'm coding a simple Flash game, just to learn flash and improve my maths,
the only mp3 flash player I've see has been the Google Audio widget which
I am coding board game server using Netty. Using TCP at every part of
I am coding a flash game in which the ball hits a movie clip
I have an ugly druple-gardens RSS feed coming into flash and I'm using the
I'm currently working through a AS3 game tutorial on Lynda.com and am coming across
I'm a Flex developer who had to do some coding in Flash, so my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.