dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [RESOLVED] Component font formatting in AS3?

Hybrid View

  1. #1
    Junior Member
    Join Date
    Dec 2006
    Location
    Colorado
    Posts
    7

    resolved [RESOLVED] Component font formatting in AS3?

    This may be a newbie question but I'm struggling -- how do I change the typeface and/or type size on either a checkbox or button component in CS3/AS3? http://board.flashkit.com/board/imag...ies/scared.gif

    Thx!

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Central PA
    Posts
    120

    Angry

    I would like to know the same thing. The sample code in the Flash Help does not seem to work for me.
    ?:-{>

  3. #3
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    You create a TextFormat and then apply it:

    Code:
    var tf:TextFormat = new TextFormat();
    tf.color = 0x00FF00;
    tf.font = "Georgia";
    tf.size = 18;
    myCheckbox.setStyle("textFormat", tf);
    myButton.setStyle("textFormat", tf);
    You can also change everything by using:

    Code:
    import fl.managers.StyleManager;
    StyleManager.setStyle("textFormat", tf);

  4. #4
    Junior Member
    Join Date
    Dec 2006
    Location
    Colorado
    Posts
    7
    Thank you!!! I was on the trail with textFormat but was applying it incorrectly.

    I may still talk the client into going back to AS2 because of Learning Interactions but at least this issue is resolved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center