dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: changing fonts with actionsscrpt

  1. #1
    Junior Member
    Join Date
    Mar 2005
    Posts
    11

    changing fonts with actionsscrpt

    Hey

    How do i change the font i a textfeild with actionscript?
    i need at botton to change the font and the color....

    can you help me??

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    You could use the TextFormat object,

    Code:
    var fmt = new TextFormat();
    fmt.font = "verdana";
    fmt.color = 0x999999;
    
    instanceNameOfTextfield.text = "some text";
    instanceNameOfTextfield.setTextFormat(fmt);
    note the setTextFormat method only applies to text already in the textfield, to apply formating to text that will be added to the field later you can use setNewTextFormat instead.

  3. #3
    Junior Member
    Join Date
    Mar 2005
    Posts
    11

    that did it

    thanks a lot that did the job

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