Preloader for .jpg in extrnal .swf

Hello chaps!
I have this problem. I have preloader - very simple thing. It works in mine file . But than I want to load gallery ( external.swf ) which will load photos. Now the deal is that I want to have preloader for the photos. I did it but have no idea where the issue is. It doesn’t work.

here is the code:

//Gets the percent loaded and assigns it to the variable x
var x = _root.getBytesLoaded()/_root.getBytesTotal()*100;
//Scales the FillBar to the percent loaded
FillBar._xscale = x;
//Rounds the percent and displays it in the text box
loaded = Math.round(x) + "%";
//If the movie is loaded, play
if (x>=100) {
	_root.play();
}

It works on the main movie when the website start.
Is there a path issue?
I don’t know where shoul I place the preloader ( it is as movie clip ) - on the timeline of gallery scene or on the timeline of gallery.swf

Please help!

Thank you