• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Dynamic text refuses to let me display numbers

Community Beginner ,
Aug 13, 2019 Aug 13, 2019

Copy link to clipboard

Copied

I have a dynamic text box that I want to say "Level x Complete!"  where x is the level number.

The way I have attempted to do this is textbox.text = "Level " + lvlnum.toString() + " Complete!" But what I get is "Level  Complete" instead.

When I trace( "Level " + lvlnum.toString() + " Complete!") I get the correct answer the text box refuses any stringified number I put in, for example I changed it to  textbox.text = "Level 5a5b5c " + String(5)+ " Complete!" and I get "Level abc  Complete!"

Why is it ignoring all numbers even when they are technically strings? How do I get it to display the string as I want it?

TOPICS
ActionScript

Views

205

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 14, 2019 Aug 14, 2019

Hi.

Make sure you're embedding the font in the Properties panel. It may be one of the possible reasons.

Please let us know if this fixes the issue.

Regards,

JC

Votes

Translate

Translate
Community Expert ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

Hi.

Make sure you're embedding the font in the Properties panel. It may be one of the possible reasons.

Please let us know if this fixes the issue.

Regards,

JC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

That was the issue, thank you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

LATEST

You're welcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines