Hi,
my first steps on the road to XML lead to a simple question. Why doesn’t text 2 load when I press ‘mc’?
[AS]
this.createEmptyMovieClip(‘mc’, 1);
mc.createTextField(“veld”, 2, 0, 0, 300, 200);
var fmt:TextFormat = new TextFormat();
fmt.font = “Verdana”;
fmt.size = 12;
fmt.bold = true;
var my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success) {
if (success) {
var a = mc.veld;
a.text = this.firstChild.childNodes[0].firstChild;
a.setTextFormat(fmt);
mc.onRelease = function() {
mc.veld.text = this.firstChild.childNodes[1].firstChild;
};
}
};
my_xml.load(“my_document.xml”);
[/AS]
XML:
<news>
<item>
this is text 1
</item>
<item>
then this must be text 2
</item>
</news>
thank you!
jerryj.