Blank flash with AS2 tween, help please?

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 movieclip, 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 I’ve tried doing a loader, but it doesn’t seem to work…

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(1000);

var numExt:Number = 4;
var currentElement:Number = 0;

var extArray: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!

Also, my buttons don’t stay on top of the clips! =O

Thanks a lot! :smiley: