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?