ktsixit
12-15-2008, 09:16 AM
Hi all,
I have the following code in my flash, which retrieves text from an xml file.
What I want to do is to apply some styles on the text before it's printed on page
myXML.onLoad = function(success){
if(success){
var root = this.firstChild;
nodes = root.childNodes;
for(var i=0; i<nodes.length; i++) {
scroll_text.text += nodes[i].attributes.name + "\n";
subnodes = nodes[i].childNodes;
scroll_text.text += subnodes[0].firstChild.toString() + "\n\n";
}
} else title_txt.text = "Error loading XML document";
}
right now the code above give this kind of output:
title ( ---> scroll_text.text += nodes[i].attributes.name + "\n"; )
text ( ---> scroll_text.text += subnodes[0].firstChild.toString() + "\n\n"; )
title
text
...
What I want is to make title bold and draw a line between two nodes:
title
text
-------------------------------------------------line------
title
text
-------------------------------------------------line------
...
How am I supposed to do that?
I have the following code in my flash, which retrieves text from an xml file.
What I want to do is to apply some styles on the text before it's printed on page
myXML.onLoad = function(success){
if(success){
var root = this.firstChild;
nodes = root.childNodes;
for(var i=0; i<nodes.length; i++) {
scroll_text.text += nodes[i].attributes.name + "\n";
subnodes = nodes[i].childNodes;
scroll_text.text += subnodes[0].firstChild.toString() + "\n\n";
}
} else title_txt.text = "Error loading XML document";
}
right now the code above give this kind of output:
title ( ---> scroll_text.text += nodes[i].attributes.name + "\n"; )
text ( ---> scroll_text.text += subnodes[0].firstChild.toString() + "\n\n"; )
title
text
...
What I want is to make title bold and draw a line between two nodes:
title
text
-------------------------------------------------line------
title
text
-------------------------------------------------line------
...
How am I supposed to do that?