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

  • SEARCH
  • Home
  • 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 260847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:22:56+00:00 2026-05-11T22:22:56+00:00

How can I make my strings and text attributes bold in my actionscript code?

  • 0

How can I make my strings and text attributes bold in my actionscript code?

I’m working with the code behind pattern so i have an mxml component with a text attribute. I then have my actionscript component where I concatenate three text attribute and set them as the text property on the mxml text component.

I want to be able be flexible with the styles of each text field I concatenate. I want the first text bold and the last bold however. Any ideas?

  • 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-05-11T22:22:56+00:00Added an answer on May 11, 2026 at 10:22 pm

    If you want to use different font weights for a text, you have no other choice than creating 2 text components (Label, Text, …).

    If you use external fonts, be sure to embed both normal and bold fonts :

    @font-face
    {
        src:                    url("calibri.ttf");
        fontFamily:             calibri;
        advanceAntiAliasing:                    true;
        fontWeight:             normal;
    }
    
    @font-face
    {
        src:            url("calibrib.ttf");
        fontFamily:     calibri;
        fontWeight:     bold;
    }
    

    and set some styles in your css like :

    .calibri16
    {
        font-size: 16;
        font-weight:normal;
        font-family:calibri;
        color: #666666;
    }
    
    .calibri16b
    {
        font-size: 16;
        font-weight:bold;
        font-family:calibri;
        color: #666666;
    }
    

    You can then set the styleName property of your text components :

    <HBox>
    <Label id="myLabel" styleName="calibri16b" text="This is bold" />
    <Label id="myLabel2" styleName="calibri16" text="and regular" />
    </HBox>
    

    In Action Script :

    myLabel.styleName = "calibri16b";
    myLabel2.styleName = "calibri16";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Flex/Actionscript 3 application that displays RSS feeds in a Text element.
In my app, I'm trying to make admin user can edit one attribute of
I have the code below where it validates the form. How do i make
I have a model with 30 attributes. but those attributes can be grouped in
Is there a way to make jsf validator handle empty strings? I have a
I am trying to find the original android source code, where the android:text attribute
I need to know how i can make a string like hello to Hello
std::map<std::string, int> m; // Can I make assumption that m[NoSuchKey] will return 0? std::cout
I can make my program write a .dat file with an array of Node
How can make a link within a facebox window that redirects it to another

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.