[MX2004] Help Needed with next / previous btns

I’m a beginning flash student and I’ve started out trying to create a photo gallery with thumbnails using xml. So far I’ve got the basics down but I can’t seem to code the variables right for the next / previous buttons. I’m in a little over my head with the actionscript as I’ve only really been coding for a few days. If anyone knows how to fix this it’d help me out a ton.

Also is there any way to simplify the thumbnail rows? I couldn’t figure out the proper way so I just made many “for” statements using different parameters for ‘i’. It looks like there should be a simpler way.

bear of www.bigevilrobot.com