# Previous Button: Going from first item in XML to the Last

**URL:** <https://forum.kirupa.com/t/previous-button-going-from-first-item-in-xml-to-the-last/224877>\
**Category:** programming\
**Created:** [May 6, 2007, 5:30pm UTC](https://forum.kirupa.com/t/previous-button-going-from-first-item-in-xml-to-the-last/224877 "2007-05-06T17:30:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eljefeloco](https://avatars.discourse-cdn.com/v4/letter/e/b77776/32.png) [@eljefeloco](https://forum.kirupa.com/u/eljefeloco)\
**Post date:** [May 6, 2007, 5:30pm UTC](https://forum.kirupa.com/t/previous-button-going-from-first-item-in-xml-to-the-last/224877/1 "2007-05-06T17:30:01Z")

</div>

Hi,

First time poster here… I’ve been working with the Phot gallery tutorial posted here:

[http://www.kirupa.com/developer/mx2004/xml\_flash\_photogallery.htm](http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm)

and first off it’s a great tutorial! Very helpful. However, I’d like to be able to make the previous button go to the last image in the XML? Anyone have any ideas? I’m unable to figure out how to get the total number of photos.

thanks,  
eljefeloco
