# Xml load into text box scroll

**URL:** <https://forum.kirupa.com/t/xml-load-into-text-box-scroll/21819>\
**Category:** Uncategorized\
**Created:** [May 26, 2003, 9:30pm UTC](https://forum.kirupa.com/t/xml-load-into-text-box-scroll/21819 "2003-05-26T21:30:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![awarlock](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@awarlock](https://forum.kirupa.com/u/awarlock)\
**Post date:** [May 26, 2003, 9:30pm UTC](https://forum.kirupa.com/t/xml-load-into-text-box-scroll/21819/1 "2003-05-26T21:30:14Z")

</div>

external text loaded into scroller - xml  
Im loading an xml file into a scrollable text box using this script:

xmlLoad(“cv.xml”);

function xmlLoad(newXml){  
menuXML = new XML ();  
menuXML.load(newXml);  
menuXML.ignoreWhite = true;  
menuXML.onLoad = parseThisXml;  
}

function parseThisXml(){  
scroller.target = textField;  
textField.background = true;  
textField.backgroundColor = 0xFFFFFF;  
textField.html=true;  
textField.htmlText=this.firstChild;  
}

function loadTextbox(newText){  
loadVarsText = new loadVars();  
loadVarsText.load(newText);  
loadVarsText.onLoad = function(success) {  
if (success) {  
textField.html = true;  
textField.htmlText = this.fieldContents;  
textField.background = true;  
textField.backgroundColor = 0xF7BDDE;  
}else{  
textField.htmlText = “Text not loaded!”;  
}  
}

\*\*\*\*\*\*MY PROBLEM IS that when i put it on the main timeline it works fine. But if i put this into a movieclip, within a movieclip on my timeline, then it cannot find the xml file to load.

How do i fix this?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2003, 11:30pm UTC](https://forum.kirupa.com/t/xml-load-into-text-box-scroll/21819/2 "2003-05-26T23:30:11Z")

</div>

Well I don’t see anything wrong with the xml code, so I am going to assume that after you put whatever in the movieclip you might have some targeting issues to your textbox or something.
