# Help with XML Gallery

**URL:** https://forum.kirupa.com/t/help-with-xml-gallery/275804
**Category:** flash
**Created:** [November 18, 2008, 9:55pm UTC](https://forum.kirupa.com/t/help-with-xml-gallery/275804 "2008-11-18T21:55:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Poncho5k](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@Poncho5k](https://forum.kirupa.com/u/Poncho5k)
#### Post date: [November 18, 2008, 9:55pm UTC](https://forum.kirupa.com/t/help-with-xml-gallery/275804/1 "2008-11-18T21:55:21Z")

</div>

Hi everyone. Just having a problem with this as2 photogallery.  
var content1 = “”;  
var content2 = “”;

function sendContent() {  
var sendContent:LoadVars = new LoadVars();  
sendContent.onLoad = function(success:Boolean) {  
if (success) {

```
    } else {

    }
};
var processContnet:LoadVars = new LoadVars();
strMasterContent = "&lt;t1&gt;"+content1+"&lt;/t1&gt;";
strMasterContent += "&lt;t2&gt;"+content2+"&lt;/t2&gt;";
trace(strMasterContent);
processContnet.masterContent = strMasterContent;
processContnet.sendAndLoad("NONE",sendContent,"POST");

```

}

\_root.btnSubmitContent.onRelease = function() {  
trace(“SENDING CONTENT”);  
sendContent();  
};

\_root.addPhoto1.onRelease = function() {  
getPhotos(1);  
};

function getPhotos(intPhotoArea) {

}

// GET IMAGES //  
var fetchImagesXML = new XML();  
fetchImagesXML.ignoreWhite = true;

fetchImagesXML.onLoad = function(success) {  
if (success) {  
trace(“IMAGE XML LOADED”);  
\_root.Images = fetchImagesXML.firstChild.childNodes;  
trace(Images.length);  
buildImageBox();  
} else {  
trace(“FAILED”);  
}  
};  
fetchImagesXML.load(“images.xml”);

addPhoto1.onRelease = function() {  
box1.\_alpha = 100;  
};  
box1.closer.onRelease = function() {  
box1.\_alpha = 0;  
};

\_root.p = 0;

function buildImageBox() {  
imageText = Images[\_root.p].attributes.title;  
trace(imageText);  
imageURL = Images[\_root.p].firstChild.nodeValue;  
imageURL = “images/”+imageURL;  
trace(imageURL);  
thisClip = createEmptyMovieClip(“image”+\_root.p, this.getNextHighestDepth());  
thisClip.\_y = (\_root.p\*150);

```
var mcLoader:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();

listener.onLoadInit = function(target:MovieClip):Void {
    trace(target+".onLoadInit");
    trace("Width: "+target._width);
    trace("Height: "+target._height);

    if (target._width&gt;target._height) {
        intScale = 100/target._height;

        target._yscale = intScale*100;
        target._xscale = intScale*100;
        trace(target._xscale);
    } else {
        intScale = 100/target._width;
        target._yscale = intScale*100;
        target._xscale = intScale*100;
        trace(target._xscale);
    }
    if (p&lt;Images.length-1) {
        _root.p += 1;
        buildImageBox();
    }
    target.onRelease = function() {
    loadMovie(imageURL,"addPhoto1");
    };
};
mcLoader.addListener(listener);
mcLoader.loadClip(imageURL,thisClip);

```

}

onRelease down at the bottom is messed up. i’m trying to figure out how when I click on one of the pictures that is being displayed i can get that image to load in another movieclip that is to the right of the images. Does anyone know how to do this?

Thanks in advance!
