|
|
|
#1 |
|
Grandmaster Flash
Join Date: Apr 2004
Location: Edinburgh, Scotland
Posts: 139
|
Multi-coloured text in dynamic text field
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
__________________
If it ain't broke, don't fix it. |
|
|
|
|
|
#2 |
|
Grandmaster Flash
Join Date: Apr 2004
Location: Edinburgh, Scotland
Posts: 139
|
I'd really like to know if this is possible or not.
Thanks
__________________
If it ain't broke, don't fix it. |
|
|
|
|
|
#3 |
|
FK'n_dog
Join Date: Apr 2003
Location: "aaarf"
Posts: 9,176
|
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);
|
|
|
|
|
|
#4 |
|
Grandmaster Flash
Join Date: Apr 2004
Location: Edinburgh, Scotland
Posts: 139
|
Thanks modified dog - this looks promising. I take it I can use this with an embedded font too?
Cheers
__________________
If it ain't broke, don't fix it. |
|
|
|
|
|
#5 |
|
FK'n_dog
Join Date: Apr 2003
Location: "aaarf"
Posts: 9,176
|
Sure can.
![]() Link your font in the Library and use its identifier name mytext.embedFonts = true; format.font = "web"; // Linkage name of font |
|
|
|
|
|
#6 |
|
Grandmaster Flash
Join Date: Apr 2004
Location: Edinburgh, Scotland
Posts: 139
|
that's great.
Thanks again
__________________
If it ain't broke, don't fix it. |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|