IMG loader problem

Hi there,
I’ve made an IMG loader which works fine on the first frame but once im going to another frame and back to the first frame with the IMG loader, im getting an error #1009.
how i can be sure that all of the script is loaded properly everytime im jumping between frames ?