Externally loaded images and a blank screen

Hey everyone, I’m still making that slideshow I’ve posted about before, and all in all its working pretty well, but I have hit a cosmetic issue.

When I load the new image to fade to it, there is a short delay where just the background is visible.

What I do is load the current image into the top frame, and the new image into the bottom one, then fade the top frame out, (hopefully) leaving only the bottom one.

It does this, but it delays a crucial second or so, my assumption to load the other image into the other clip, but I’m not exactly sure why and therefore cannot fix it.

Is there a way to check if a movieclip is fully loaded before doing something? I cannot do a ‘total bytes’ thing because each image is a different size.

Here is my current code:

on the (forward)button:

on(release){
import mx.transitions.Tween;
import mx.transitions.easing.*;

slides_exteriors_top.loadMovie(extArray[currentElement]);
currentElement++;

slides_exteriors_bot.loadMovie(extArray[currentElement]);

var xFadeETO:Tween = new Tween(slides_exteriors_top, “_alpha”, regular, 100, 0, 2, true);
var xFadeEBI:Tween = new Tween(slides_exteriors_bot, “_alpha”, regular, 0, 100, 2, true);
}

On the initial frame:

import mx.transitions.Tween;
import mx.transitions.easing.*;
btn_next.swapDepths(1000);
btn_prev.swapDepths(999);

var numExt:Number = 4;
var numSpe:Number = 0;
var numInt:Number = 0;
var numNew:Number = 0;
var currentElement:Number = 0;

var extArray:Array = new Array();
var speArray:Array = new Array();
var intArray:Array = new Array();
var newArray:Array = new Array();

for (i = 0;i < numExt; i++) {
var extLoc:String = “resized/exteriors_” + (i + 1) + “.jpg”;
extArray.push(extLoc);
}

this.createEmptyMovieClip(“slides_exteriors_top”,2);
this.createEmptyMovieClip(“slides_exteriors_bot”,1);
var xFadeET:Tween = new Tween(slides_exteriors_top, “_alpha”, regular, 0, 100, 2, true);

slides_exteriors_top.loadMovie(extArray[currentElement]);

Your help would be greatly appreciated!

Thanks a lot! :smiley: