Preloader by each scene

I know how to make a preloader for the whole movie. But I want to find out how to make a preloader for each scene. Does anybody can help me?

The way I do it is like this…

totalK = getBytesTotal()/1000;
loadedK = getBytesLoaded()/1000;
remainingK = totalK-loadedK;
percentageK = (loadedK/totalK)*100;
setProperty (“bar”, _xscale, percentageK);
if (loadedK>=totalK && totalK != 0) {
gotoAndPlay (3);
}

and I put goto action on the second frame.

I want to make this preloader for each scene.
Help me PLEASE.

try using “if frame is loaded”

Well… I personaly don’t like the framesLoaded method… but in this case, I think you’re right. One COULD examine your movie and see how many bytes make up each scene in order to use bytesTotal, but that would be a real pain in the tookus.

If you were to create your entire movie in one scene, using movie clips, and or the loadMovie command to display various parts of your movie, then you could use bytesTotal and bytesLoaded. They are very good at targeting objects themselves.

the ultimate problem with using them on scenes is that the Flash inturpreter doesn’t care what scenes are in a movie. getBytesTotal means exactly that… the total bytes of the object it is referencing. The root timeline’s total frames IS the whole movie from scene one to infinity.