Forward and Back Btns w/ Dynamic Imgs

I’m wondering if this is possible to do, because I’ve tried all that I could think of, but it wouldn’t work…

I have a gallery in which I am dynamically loading the images into the Flash Loader component. I would like to have forward and back buttons that recognize which image is currently in the loader, and to go to the next or previous image. I have the images named sequentially (img001, img002, and so on).

I can’t figure out how to script it, and I’m sure that there’s a way to do it.

Any help is appreciated,
~Sam