# Loading New XML in Textarea with Actionscript

**URL:** <https://forum.kirupa.com/t/loading-new-xml-in-textarea-with-actionscript/165381>\
**Category:** flash\
**Created:** [October 10, 2005, 7:27pm UTC](https://forum.kirupa.com/t/loading-new-xml-in-textarea-with-actionscript/165381 "2005-10-10T19:27:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilostmydream](https://avatars.discourse-cdn.com/v4/letter/i/b487fb/32.png) [@ilostmydream](https://forum.kirupa.com/u/ilostmydream)\
**Post date:** [October 10, 2005, 7:27pm UTC](https://forum.kirupa.com/t/loading-new-xml-in-textarea-with-actionscript/165381/1 "2005-10-10T19:27:53Z")

</div>

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](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:

```auto

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:

```auto

//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 🙂

Maile
