Panning Image

Hi, I need help with panning an image. I already made the panning but I cant stop the image when it reach the border of the mask. I look for tutorials in other sites and haven’t found anything :frowning:

If some one want to see my .fla here it is:
www.ebsolutions.ws/imagepanning.fla

Thank you