# Flash 8 AS2 xml loadmovie problem

**URL:** <https://forum.kirupa.com/t/flash-8-as2-xml-loadmovie-problem/295265>\
**Category:** flash\
**Created:** [August 27, 2009, 11:14am UTC](https://forum.kirupa.com/t/flash-8-as2-xml-loadmovie-problem/295265 "2009-08-27T11:14:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![molly\_ferns](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@molly\_ferns](https://forum.kirupa.com/u/molly_ferns)\
**Post date:** [August 27, 2009, 11:14am UTC](https://forum.kirupa.com/t/flash-8-as2-xml-loadmovie-problem/295265/1 "2009-08-27T11:14:53Z")

</div>

Hello i just got a very small problem which i know i’ll get the answer here…i’m new in this so i couldn’t figure it out after trying for sooo long…I’m just trying to load a single image based on its id from an xml file…The xml looks something like this:

```auto
<?xml version="1.0" encoding="utf-8"?>
<gallery>
	<item image="photos/photo01.jpg" image_id = "100" />
	<item image="photos/photo02.jpg" image_id = "101" />
        <item image="photos/photo03.jpg" image_id = "102" />
</gallery>

```

The AS code is

```auto
var my_xml = new XML()
my_xml.ignoreWhite = true
	my_xml.load("gallery.xml")
my_xml.onLoad = function(success){
trace("success")
if(success){
for(i=0;i < my_xml.firstChild.childNodes.length; i++){
	var img = my_xml.firstChild.childNodes*
	var id = img.attributes.image_id
	var path = img.attributes.image
	trace(id) [COLOR="Red"](this gives the id ie 100,101,102)[/COLOR]
	id = path
	trace(id)[COLOR="red"](this gives photos/photo01, photos/photo02 and so on)[/COLOR]

}
}
			holder1.loadMovie(_root.id)
}

```

Now in the html i have specified index.swf?id = 100 but it does not show anything…Any ideas anyone??
