XML to dynamic textfield

Hi everyone,

I’m quite new with Flash and experiencing some problems with xml and as3.
What I want is to load text from external xml-file to dynamic text field in Flash.

The very basic xml-file introduction.xml looks like this:


<root>
<bio>
lorem ipsum etc.
</bio>
</root>

My code goes like this:


[FONT=Helvetica][/FONT]
[FONT=Helvetica][FONT=Verdana]this.stop();[/FONT][/FONT]
[FONT=Helvetica][/FONT]
[FONT=Helvetica][FONT=Verdana]var introduction:XML;[/FONT][/FONT]
[FONT=Helvetica][FONT=Verdana]var xmlLoader:URLLoader = new URLLoader();[/FONT][/FONT]
[FONT=Helvetica][FONT=Verdana]xmlLoader.addEventListener( Event.COMPLETE, xmlLoaderComplete );[/FONT][/FONT]
[FONT=Helvetica][FONT=Verdana] [/FONT][/FONT]
[FONT=Helvetica][FONT=Verdana]xmlLoader.load( new URLRequest( ‘introduction.xml’ ));[/FONT][/FONT]
[FONT=Helvetica][FONT=Verdana] [/FONT][/FONT]
[FONT=Helvetica][FONT=Verdana]function xmlLoaderComplete( evt:Event ):void {[/FONT][/FONT]
[FONT=Verdana][FONT=Helvetica] introduction[/FONT][FONT=Helvetica] = XML( evt.target.data);[/FONT][/FONT]
[FONT=Verdana][FONT=Helvetica] [/FONT][FONT=Helvetica]trace( introduction.bio );[/FONT][/FONT]
[FONT=Helvetica][FONT=Verdana] [/FONT][/FONT]
[FONT=Helvetica][FONT=Verdana]}[/FONT][/FONT]


Tracing is ok, no problem, but how should I load this xml-file to dynamic text field? I have dynamic textfield called content but I can’t find the right way to get that xml to this content.

I know it’s quite basic thing for most of you, but as I said I’m quite new with Flash… If someone is willing to help me it would be highly appreciated!