# \[help\]as3 xml error

**URL:** <https://forum.kirupa.com/t/help-as3-xml-error/267019>\
**Category:** flash\
**Created:** [July 27, 2008, 4:03pm UTC](https://forum.kirupa.com/t/help-as3-xml-error/267019 "2008-07-27T16:03:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fleasy](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@fleasy](https://forum.kirupa.com/u/fleasy)\
**Post date:** [July 27, 2008, 4:03pm UTC](https://forum.kirupa.com/t/help-as3-xml-error/267019/1 "2008-07-27T16:03:39Z")

</div>

So I’m playing around with xml and as3.

Now I got this:

```auto
var fileList:XMLList = bookInput.Songs.file1;

```

And now I want that if you push a button, file1 changes in file2.

So I got this:

```auto
var j:uint=1;

```

But when I change the first snipped in this:

```auto
var fileList:XMLList = bookInput.Songs.file+j;

```

it gives this error:

> TypeError: Error #1034: Type Coercion failed: cannot convert “1” to XMLList.

How to fix it?

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [July 27, 2008, 4:19pm UTC](https://forum.kirupa.com/t/help-as3-xml-error/267019/2 "2008-07-27T16:19:03Z")

</div>

var fileList:XMLList = bookInput.Songs[“file”+j]
