Simple dynamic preloader help

Okay, i’m completely confused on dynamic preloaders, i read through claudios tutorial on the dynamic preloader/transitions, but i’m having a difficult time understanding it…

What i’m looking for is a very basic dynamic preloader, for images loaded into a container on the root level of swf. I’m not really sure how to do this…what i tried to do was use:

[AS]
onClipEvent(enterFrame) {
var bytesLoaded = this.getBytesLoaded;
var bytesTotal = this.getBytesTotal;

if(bytesLoaded == bytesTotal) {
	_root.transition.gotoAndPlay("open");
}
else {
	_root.transition.gotoAndPlay("closed");
}

}
[/AS]

On the container MC, and have the transition MC above that, but it doesn’t seem to work, I’m not even sure if this is the correct methodology for making a simple dynamic preloader for images and such.

If i’m close could some one please tell me what i’m doing wrong…If this isn’t close to working could some one please post a simple example?

thanks :hr: