# Flash and xml

**URL:** https://forum.kirupa.com/t/flash-and-xml/299328
**Category:** Uncategorized
**Created:** [November 3, 2009, 3:01pm UTC](https://forum.kirupa.com/t/flash-and-xml/299328 "2009-11-03T15:01:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DanT1](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@DanT1](https://forum.kirupa.com/u/DanT1)
#### Post date: [November 3, 2009, 3:01pm UTC](https://forum.kirupa.com/t/flash-and-xml/299328/1 "2009-11-03T15:01:44Z")

</div>

hi, sorry my english isn’t well (i can better read and understand it, than i can write or speak it).

i’m looking for a chance get my pictures, which are loading about a .xml in a MC to bring them right-aligned and valign=“middle”.

i’m not so good in xml, but i want to understand it.

for that i found some script, which is to load a picture in this way:

```auto

var picture_mc:MovieClip = createEmptyMovieClip("picture_mc", 1);

var pictureLoader:MovieClipLoader = new MovieClipLoader()
var pictureLoader_listener:Object = new Object()

pictureLoader.addListener(pictureLoader_listener);

pictureLoader_listener.onLoadInit = function(target:MovieClip){
        
    target._yscale = target._xscale = 50
    target._x = Stage.width / 1 - target._width / 1;
    target._y = Stage.height / 2 - target._height / 2;
    
}

pictureLoader.loadClip("images.xml", picture_mc);

```

but, how can i fix it to load a .xml in this mc?

i allready have a mc named “pictures”, where the .xml will load, but it haven’t this function:

```auto

function loadXML(loaded) {
    if (loaded) {
        xmlNode = this.firstChild;
        image = [];
        description = [];
        thumbnails = [];
        _global.total = xmlNode.childNodes.length;
        for (i=0; i<total; i++) {
            image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
            description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
            thumbnails* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
            thumbnailer(i);
        }

        firstImage();
    } else {
        trace("file not loaded!");
    }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad =loadXML;
xmlData.load("images.xml");

```

[URL=“[http://dict.leo.org/ende?lp=ende&p=5tY9AA&search=right-aligned](http://dict.leo.org/ende?lp=ende&p=5tY9AA&search=right-aligned)”]
