# \[fl8\]

**URL:** <https://forum.kirupa.com/t/fl8/199151>\
**Category:** Uncategorized\
**Created:** [August 31, 2006, 12:43pm UTC](https://forum.kirupa.com/t/fl8/199151 "2006-08-31T12:43:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VDG](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@VDG](https://forum.kirupa.com/u/VDG)\
**Post date:** [August 31, 2006, 12:43pm UTC](https://forum.kirupa.com/t/fl8/199151/1 "2006-08-31T12:43:27Z")

</div>

Hi Kirupa,

I am using an xml file to store the locations of images. I can load all the images listed in the xml - no problem. Now I want to make a navigation that adds a button for every 5 images, so that when you click the first button, it loads images 1 to 5, button 2 images 6 to 11, and so on. But, here comes the problem, if my total amount of images is not a multiple of 5, how could I tell Flash to make a button for the remaining images?  
I initially wanted to just set a startNumber and endNumber and add or subtract 5 on each button press, but I think it’s not as simple as that…Do I have to split the original array into sub arrays? :crazy:

Some help on this would be great…

Thanks for any input,

VDG
