Xml photo gallery - to see next set of thumnails

I create a photo gallery from xml using AS3 and it loads fine. I want to limit 5 thumbnails on stage.

To see more you have to click the next button to see the next set of 5. Click prev button to see the previous 5.

I have spent hours on internet but I can’t find the right tutorial or code (they are either is AS2 or written for next image). Can someone help me?