PDA

View Full Version : text and XML


lookatme0128
03-04-2008, 02:03 PM
ok, so i'm loading in some text from xml. all this text goes into one text field on the stage. this text also includes headings etc.

How can i format the heading of the text to a different font if it is all contained in the same text field?

i know how to do this when the heading is in a separate textfield because then i just format that specific field.

i tried HTML in the XML and all i could do was make it bold. i'm looking at CSS but i have a feeling that wont get me far either.

the headings are in separate nodes in the XML so i can specifically call to the heading to change it.

HELP! any ideas would be great.

THANKS!

lookatme0128
03-04-2008, 07:46 PM
no ideas?? i guess the best way is to add text differently formatted text fields to the stage depending upon when a heading node is pulled from the XML?? dangit i didn't want to do all that!

Thanks!

weaksauce
03-04-2008, 09:16 PM
I'm using a similar application of XML, and i just have multiple TextField objects... remember though that you don't need to create new text fields for each item if it changes, you can just change myTextField.text

lookatme0128
03-04-2008, 10:47 PM
ahhhhhh...i figured i would have to go that route...thanks for your help!