Zoom & Pan Boundaries

Hello everybody,

I’m trying to set some boundaries to my zoom/pan movie here…
http://www.rickdu.net/examples/boundaries/

It works fine until you hit the zoom buttons… The goal is to keep the image on the stage at all times… If it were working properly, you would never see the stage background…

Would anybody be able to offer any help in getting this resolved?? Or maybe somebody knows of a tutorial I can visit or a file I can download that is close to this??

Thanks