Hi,
I’m trying to load a jpeg, display a text preloader then fade in the image. I can get the preloader working but when I tack on the call to the fadeIn function at the end all I see is the fade and no preload. What am I doing wrong here?
I’ve got the following code:
on frame 1
//variables
var series = “p”;
var index = 1;
var totalFiles = 22;
loadMovie("…/images/"+series+"/image"+index+".jpg", “container”);
fadeIn = function () {
if (container._alpha<=100) {
container._alpha += 5;
}
};
same frame different layer
stop();
container._visible = false;
this.onEnterFrame = function ()
{
var l = container.getBytesLoaded();
var t = container.getBytesTotal();
var getPercent = l / t;
loadText = "Photo loading… " + Math.round(getPercent * 100) + “%”;
if (l > 0 && l >= t)
{
container._visible = 1;
loadText = “”;
container._alpha = 0;
_root.onEnterFrame = fadeIn ;
}
}