TextField Font Color
- Started
- Last post
- 8 Responses
- nRIK
hi all,
was just wondering if its possible to format certain words in a TextField using AS, for example, change its color, or making it bold? Or would I have to create a seperate TextField if I wanted to do that? Atm, Im loading them seperately
cheers,
- afxrephlex0
check htmlText in help
- UndoUndo0
css
- afxrephlex0
css is not required but used
just do this:
myTF.htmlText = "lorem ipsum dolor";
- UndoUndo0
css gives you more control
- afxrephlex0
css surely gives better control, readability and most of all editing the style is faster.
- nRIK0
yea ive been trying to do that
like have this in the text:
myTF.htmlText = "lorem ipsum sit < span style = " color: #fff; " > ametdolor";
doesnt seem to work...thx tho
ill try something else
- UndoUndo0
you need to create a styleSheet import it, apply it to your text field and then reference the styles properly in your html
- afxrephlex0
either
select "render text as html" from the properties panel
or
do this with as:
myTF.html = true;