Hi
I need to create a text field with Actionscript that is comprised of text in 2 colours. Is this possible (maybe with textformat)?
Thanks in advance
g
Printable View
Hi
I need to create a text field with Actionscript that is comprised of text in 2 colours. Is this possible (maybe with textformat)?
Thanks in advance
g
I'd really like to know if this is possible or not.
Thanks
is this what you seek ?
Code:this.createTextField("mytext", 10, 300, 200, 10, 10);
mytext.autoSize = true;
mytext.html = true;
mytext.htmlText = "Hello Mum :)<br>"+
"<p align='center'>Hello<br>World";
mytext.textColor = 0x00FF00;
format = new TextFormat();
format.color = 0xFF0000;
format.size = 25;
mytext.setTextFormat(6,18,format);
Thanks modified dog - this looks promising. I take it I can use this with an embedded font too?
Cheers
Sure can. :D
Link your font in the Library and use its identifier name
mytext.embedFonts = true;
format.font = "web"; // Linkage name of font
that's great.
Thanks again