# Loading one image in a movieclip with XML

**URL:** <https://forum.kirupa.com/t/loading-one-image-in-a-movieclip-with-xml/185176>\
**Category:** flash\
**Created:** [April 11, 2006, 3:56pm UTC](https://forum.kirupa.com/t/loading-one-image-in-a-movieclip-with-xml/185176 "2006-04-11T15:56:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wayne](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wayne/32/16501_2.png) [@Wayne](https://forum.kirupa.com/u/Wayne)\
**Post date:** [April 11, 2006, 3:56pm UTC](https://forum.kirupa.com/t/loading-one-image-in-a-movieclip-with-xml/185176/1 "2006-04-11T15:56:05Z")

</div>

I have done this before and I lost my files. Im trying again I want to only load a simple image using xml in flash.

Its basic I made a movie clip and called it “picture” and then I created a layer and called it actions and in the actions layer I added the code I made and learned from Kirupas tutorial. But the image do not show up.

Im using 2 images witch are a .jpg format

```auto
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>

<images>
	<img>cent.jpg</img>
	<img>cent2.jpg</img>
</images>

```

////

```auto
function loadXML(loaded) {
	if (loaded) {
		xmlNode = this.firstChild;
		image = [];
		total = xmlNode.childNodes.length;
		for (i=0; i<total; i++) {
			image* = xmlNode.childNodes*;
		}
		loadImage();
	} else {
		content = "file not loaded!";
	}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("myData.xml");
////////////////////////////////////////////////
function loadImage() {
	picture.loadMovie(image[1], 1);
}

```

Im just mad I cannot get this simple thing going.

---

<div class="post-metadata">

**Author:** ![adam9575](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@adam9575](https://forum.kirupa.com/u/adam9575)\
**Post date:** [April 11, 2006, 3:59pm UTC](https://forum.kirupa.com/t/loading-one-image-in-a-movieclip-with-xml/185176/2 "2006-04-11T15:59:34Z")

</div>

im also trying to parse the info from xml to flash,i has some cool video tutorials if u want me to send them to you!  
how advanced are you with AS?

;-)adam

---

<div class="post-metadata">

**Author:** ![Wayne](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wayne/32/16501_2.png) [@Wayne](https://forum.kirupa.com/u/Wayne)\
**Post date:** [April 11, 2006, 4:00pm UTC](https://forum.kirupa.com/t/loading-one-image-in-a-movieclip-with-xml/185176/3 "2006-04-11T16:00:43Z")

</div>

> [@adam9575](#):
>
> im also trying to parse the info from xml to flash,i has some cool video tutorials if u want me to send them to you!  
> how advanced are you with AS?
> 
> ;-)adam

yeah sure please send me it!

Im at middle skills at AS.

Thank you !

---

<div class="post-metadata">

**Author:** ![adam9575](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@adam9575](https://forum.kirupa.com/u/adam9575)\
**Post date:** [April 11, 2006, 4:02pm UTC](https://forum.kirupa.com/t/loading-one-image-in-a-movieclip-with-xml/185176/4 "2006-04-11T16:02:56Z")

</div>

do you have msn?

---

<div class="post-metadata">

**Author:** ![Wayne](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wayne/32/16501_2.png) [@Wayne](https://forum.kirupa.com/u/Wayne)\
**Post date:** [April 11, 2006, 4:05pm UTC](https://forum.kirupa.com/t/loading-one-image-in-a-movieclip-with-xml/185176/5 "2006-04-11T16:05:36Z")

</div>

> [@adam9575](#):
>
> do you have msn?

milladd at [gmail.com](http://gmail.com) thats my MSN also

---

<div class="post-metadata">

**Author:** ![adam9575](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@adam9575](https://forum.kirupa.com/u/adam9575)\
**Post date:** [April 11, 2006, 4:09pm UTC](https://forum.kirupa.com/t/loading-one-image-in-a-movieclip-with-xml/185176/6 "2006-04-11T16:09:52Z")

</div>

ive added you to my buddy list but you havnt come online,or showed up in my buddy list

add mine

[handsomegit2004@hotmail.com](mailto:handsomegit2004@hotmail.com)
