Movie clip slideshow in loader

I am developing a flash website.

I have a slideshow movie clip playing whilst the site loads, the problem is the site jumps to the next scene before the slideshow is finished. Is there any way I can get the code to check if the slideshow is finished before jumping to the next scene?
(If it has then go to next scene, if it is still playing wait until its finished.)

The code looks like this at the moment:

bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent100;
_root.loadText = Math.round(getPercent
100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndPlay(4);
}