External swf image preloader problem!

:huh: Hello peoples,

 I've been working with an external swf that has been loaded onto the main timeline of my movie "index.swf". I've made a preloader that shows itself when the empty mc in the external file is filled with an image and then goes invisible once loading is finished. It works fine when this code is on the main timeline but when it is an externally loaded file it gives me trouble.

Here's the code I have on the empty mc in the external swf:

onClipEvent (enterFrame) {
	if (total_bytes>loaded_bytes) {
		_level0.placeholder.loader._visible = true;
	}
	total_bytes = this.getBytesTotal();
	loaded_bytes = this.getBytesLoaded();
	remaining_bytes = total_bytes-loaded_bytes;
	percent_done = int((loaded_bytes/total_bytes)*100);
	_level0.placeholder.loader.gotoAndStop(percent_done);
	if (total_bytes == loaded_bytes) {
		_level0.placeholder.loader._visible = false;
             }
}

_level0.placeholder points to the empty mc within the main timeline holding the external swf. I don’t understand why it isn’t working. If anyone knows holla at me! haha, i mean, :bored: .

Thanks in advance!!!