# Loading xml data and showing 5 xml nodes per page

**URL:** <https://forum.kirupa.com/t/loading-xml-data-and-showing-5-xml-nodes-per-page/202388>\
**Category:** Uncategorized\
**Created:** [September 30, 2006, 2:50pm UTC](https://forum.kirupa.com/t/loading-xml-data-and-showing-5-xml-nodes-per-page/202388 "2006-09-30T14:50:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![salvadore](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@salvadore](https://forum.kirupa.com/u/salvadore)\
**Post date:** [September 30, 2006, 2:50pm UTC](https://forum.kirupa.com/t/loading-xml-data-and-showing-5-xml-nodes-per-page/202388/1 "2006-09-30T14:50:44Z")

</div>

I am loading data from xml file.  
There is 12 XML nodes (in this case)  
I don’t want to show all xml data in Flash by default.  
I am attaching one button on the stage for every 5 xml nodes (depends how much data I want to show per one page, let’s say 5)  
So every time user clicks on one of this buttons, the data from startIndex to endIndex of this button is shown

FIRST: I have a problem clearing the attached data every time user clicks the button  
SECOND: I have a problem with the last button’s endIndex variable. it should be 12 not 15 (in this case)!!!

Can someone help. I am attaching fla and xml

[www.galahala.com/test.zip](http://www.kirupa.com/forum/www.galahala.com/test.zip)
