Loading New XML in Textarea with Actionscript

Hi Everyone,

I have managed to figure out how to load external xml text fine so far when the main flash file is loaded. I have 9 buttons and what I would like to do is have a different xml file loaded into the main textarea component for each of the nine buttons. Here is the link:

http://www.mailelani.com/test/Untitled-1.htm

The problem is that in order to acheive the rollout on the buttons I created them using actionscript and the buttons are in fact movie clips. It’s all fine and dandy if I just want a link to open in a new page, but I’m having trouble reloading the xml files.

Here is the code that i’ve tried using on my actionscript buttons:


this.onRelease = function(){ 
monthContent = new XML();
monthContent.ignoreWhite = true;
monthContent.load("update_archive/test.xml");
monthContent.onLoad = function(success)
{
if(success)
{
this.month.text = monthContent;
}
}
monthContent.load("update_archive/test.xml");
 
} 

and the code that i use to load the innitial xml file:


//init TextArea component
monthText.html = true;
monthText.wordWrap = true;
monthText.multiline = true;
monthText.label.condenseWhite=true;
//load css
monthStyle = new TextField.StyleSheet();
monthStyle.load("month.css");
monthText.styleSheet = monthStyle;
//load in XML
monthContent = new XML();
monthContent.ignoreWhite = true;
monthContent.load("update_archive/10_october_2005.xml");
monthContent.onLoad = function(success)
{
if(success)
{
monthText.text = monthContent;
monthText.vPosition = 0;
 
}
}

I’m pretty stuck and I’ve tried just about everything so any help in the right direction would be greatly apreciated :slight_smile:

Maile