# XML, loading an external file to a textfield

**URL:** https://forum.kirupa.com/t/xml-loading-an-external-file-to-a-textfield/78993
**Category:** flash
**Created:** [February 9, 2005, 6:38pm UTC](https://forum.kirupa.com/t/xml-loading-an-external-file-to-a-textfield/78993 "2005-02-09T18:38:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![hexadecimal](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@hexadecimal](https://forum.kirupa.com/u/hexadecimal)
#### Post date: [February 9, 2005, 6:38pm UTC](https://forum.kirupa.com/t/xml-loading-an-external-file-to-a-textfield/78993/1 "2005-02-09T18:38:05Z")

</div>

IF anyone can help me with this ill email you a new car!

The lowdown:  
The thing im trying to achieve is to load a value from an xml file, the value is “hello.txt”. This works like a charm,  
The problem is: i want to load the content of “hello.txt” into a dynamic textfield.  
I have traced the value all the way down to where the actual loading takes place. I cant seem to get the syntax right. Please help!

[color=seagreen]This is the name of the variable im declaring for my xml node[/color]  
description = new Array();  
[color=#2e8b57]This is where i load the value from the xml.[/color]  
description\* = xmlNode.childNodes\*.childNodes[4].firstChild.nodeValue;  
[color=red]Heres the problem:[/color]  
function nextImages() {  
if (p\<(total-1)) {  
p++;  
if (loaded == filesize) {  
picture.\_alpha = 0;  
picture2.\_alpha = 0;  
picture.loadMovie(image[p], 1);  
picture2.loadMovie(image2[p], 2);  
titel\_txt.text = titel[p];  
[color=red] [/color][color=#2e8b57]/_This is where i put the “hello.txt” into a variable called besK.[/color][color=red] [color=#2e8b57]_/[/color][/color]  
[color=red] besK = description[p];[/color]  
[color=red] [color=#2e8b57]/_This is where i try to load “hello.txt” into the hejsan dynamic textfield:_/  
[/color] loadVariables(“besK”, hejsan.htmlText);[/color] [color=red]  
[/color] linkS = link[p];  
picture\_num();  
}  
}  
}  
[color=#2e8b57]/_Note that i have to do this within the function in order to update it when i choose to go to the next set of images_/[/color]

Help please :sailor:
