AS3 XML Grid Multipages Gallary

Dear Readers!
I am new to AS3, i am creating a gallary and stuck on a place, have a look on source
Attachment:
rapidshare.com/files/1230054980/multi_page.zip

Requirements:
1.) Can anybody prepare a nice loop for loading all thumbs, most importent it should be physically seprated, should not be looped via code.
or any other way to compact such lenghty coding.

2.) when i click on 1st button i must load first 4 thumbnails(which is already loaded), and with 2nd button it must load next 4 thumbnails from xml file, simirlerly with 3rd.
Kindly help me out

Regards