oliverlubin
Programmer
ok, so i have a "well-formed" xml file with various information in it.
xml file snippet/example:
------------------------------------------
<section name="Introduction">
<part>Paragraph one of the introduction.</part>
<part>Paragraph two of the introduction.</part>
</section>
<section name="Setup">
<part>Paragraph one of the setup.</part>
<part>Paragraph two of the setup.</part>
<part>Paragraph three of the setup.</part>
</section>
------------------------------------------
ive managed to import the xml into flash and display it in a dynamic text field. what i want to do is format the text in multiple ways. for example, i want the "section names" to be size 12 and bold and a certain color. i want the paragraphs under each section to be size 11, non-bold and another color. once the "page" is formatted properly i already have a movieclip set up to scroll it up and down.
how do i format individual nodes as they are written into the "main body" of the dynamic text field. i was thinking i could create a new field for each new node and format each one depending on it's attribute name (is that the correct terminology). but i couldnt figure out how to make each one fit the amount of information properly without setting the size of the dynamic filed first. (if i want to stack them on top of eachother (bottom of one to top of the next), the actual size of the fields need to change based on how much text is in them.) i should mention that im doing this for 15 different xml files (and 15 different flash movies) that are formatted the same way but do not necessarily have the same "section names" for example. so one may be called "introduction", but on the next one it could not even include an "introduction" section at all.
any help would be greatly appreciated. im kinda stumped right now.
thanks,
-Oly
xml file snippet/example:
------------------------------------------
<section name="Introduction">
<part>Paragraph one of the introduction.</part>
<part>Paragraph two of the introduction.</part>
</section>
<section name="Setup">
<part>Paragraph one of the setup.</part>
<part>Paragraph two of the setup.</part>
<part>Paragraph three of the setup.</part>
</section>
------------------------------------------
ive managed to import the xml into flash and display it in a dynamic text field. what i want to do is format the text in multiple ways. for example, i want the "section names" to be size 12 and bold and a certain color. i want the paragraphs under each section to be size 11, non-bold and another color. once the "page" is formatted properly i already have a movieclip set up to scroll it up and down.
how do i format individual nodes as they are written into the "main body" of the dynamic text field. i was thinking i could create a new field for each new node and format each one depending on it's attribute name (is that the correct terminology). but i couldnt figure out how to make each one fit the amount of information properly without setting the size of the dynamic filed first. (if i want to stack them on top of eachother (bottom of one to top of the next), the actual size of the fields need to change based on how much text is in them.) i should mention that im doing this for 15 different xml files (and 15 different flash movies) that are formatted the same way but do not necessarily have the same "section names" for example. so one may be called "introduction", but on the next one it could not even include an "introduction" section at all.
any help would be greatly appreciated. im kinda stumped right now.
thanks,
-Oly