Resize border photogallery not working

Hi guys i am still a beginner with flash and i am trying to create a photo gallery with a resize frame that resize everytime it loads a jpeg.
The problem that i have is that when you first load this gallery the pics don’t load correctly(the pics are off position and the frame doesn’t resize) but as soon as you clic more everything works.
I don’t have a clue why??
Please help