# Help with AS3 Error

**URL:** <https://forum.kirupa.com/t/help-with-as3-error/297738>\
**Category:** Uncategorized\
**Created:** [October 7, 2009, 9:00pm UTC](https://forum.kirupa.com/t/help-with-as3-error/297738 "2009-10-07T21:00:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dovewing2000](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@dovewing2000](https://forum.kirupa.com/u/dovewing2000)\
**Post date:** [October 7, 2009, 9:00pm UTC](https://forum.kirupa.com/t/help-with-as3-error/297738/1 "2009-10-07T21:00:08Z")

</div>

I’ve solved the silly error I’ve made, but Thanks to \_kp for the friendly reply!

I’m new with AS3 and Basically what i’m trying to do is to load an xml file  
format below:

```auto

<?xml version="1.0" encoding="utf-8"?>
<buttons>
    <button>
        <name>Introduction</name>
        <text>
            <![CDATA[VALID HTML CODE]]>    
        </text>
    </button>
<buttons>

```

and load a list of name to the list (list) to the left and the html code to the right (textArea).

there’s only 1 place (frame 1) with AS3 code:  
(I’ve dragged the Textarea component and list component in the library and they show up … i just can’t solve the error…)

```auto

import fl.controls.*;
import flash.net.*;
import flash.text.*;

var myTextArea = new TextArea();
var myList = new List();

addChild(myTextArea);
addChild(myList);

myTextArea.width = 400;
myTextArea.length = 580;
myTextArea.x = 420;
myTextArea.y = 10;

myList.width = 400;
myList.length = 580;
myList.x = 10;
myList.y = 10;

var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
/*
function onLoaded(e:Event):void
{
    trace(e.target.data);
}
*/
myList.addEventListener(Event.CHANGE, itemChange);

function itemChange(e:Event):void
{
    myTextArea.text = myList.selectedItem.data;
}

var xml:XML;

function onLoaded(e:Event):void
{
    xml = new XML(e.target.data);
    var il:XMLList = xml.button;
    for(var i:Number=0;i<il.length();i++)
    {
        myList.addItem({label:il.name.text()*,
                    data:il.text.text()*});
        trace(il.name*);
        trace(il.text*);
    }
}

loader.load(new URLRequest("helpfile_v002.xml"));

```

I got the below error:

```auto

ReferenceError: Error #1074: Illegal write to read-only property length on fl.controls.TextArea.
    at test002_fla::MainTimeline/frame1()

```

when i Ctrl Enter on the fla file.

Any help is really really appreciated since i’m lost on what i’m doing wrong…
