# XML Image Gallery - Setting x,y of image via XML?

**URL:** <https://forum.kirupa.com/t/xml-image-gallery-setting-x-y-of-image-via-xml/175537>\
**Category:** flash\
**Created:** [January 15, 2006, 4:16pm UTC](https://forum.kirupa.com/t/xml-image-gallery-setting-x-y-of-image-via-xml/175537 "2006-01-15T16:16:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kidokay](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@kidokay](https://forum.kirupa.com/u/kidokay)\
**Post date:** [January 15, 2006, 4:16pm UTC](https://forum.kirupa.com/t/xml-image-gallery-setting-x-y-of-image-via-xml/175537/1 "2006-01-15T16:16:40Z")

</div>

I’m working on version of Kirupa’s XML Image Gallery, only I want to be able to set the x,y coordinates individually for each image. How do I do this via the XML.

I’m trying this to no avail:  
XML looks like this:

\<pic\>  
\<image x=“0” y=“0”\>001.jpg\</image\>  
\<caption\>description line 1\</caption\>  
\<caption2\>description line 2\</caption2\>  
\<caption3\>description line 3\</caption3\>  
\</pic\>

\<pic\>  
\<image x=“100” y=“200”\>002.jpg\</image\>  
\<caption\>description line 1\</caption\>  
\<caption2\>description line 2\</caption2\>  
\<caption3\>description line 3\</caption3\>  
\</pic\>

Actionscript looks like this:

function placeImage() {  
var image\_x:Number = Number(picture.attributes.x);  
var image\_y:Number = Number(picture.attributes.y);  
}

Can anyone let me know what I’m doing wrong, what I’m missing?  
Or how better to go about this?

Thanks!
