Hello,
I was wondering if anyone knows of a way to speed up the transition time between pictures for this slideshow: http://www.kirupa.com/developer/mx/photogallery.html
There is too much of a lag for larger images. Go here to see what I mean: http://www.vuhuynh.com
Is there a way to perhaps preload all images or put a preloader that displays progress while each image loads?
Any help would be greatly appreciated!
Have a look in the code for this part:
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
trace(l/t);
}
};
you can put the code for the preloader where the “trace(l/t)” now is.
So if you have a (dynamic) textfield with the instancename “loadInfo” and a loadbar with instancename “loadBar” [size=1](both w/o quotes)[/size], you can change the code like this:
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
percent = Math.round((l/t)*100);
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
loadInfo.text = percent+" % loaded";
loadBar._xscale= percent;
}
}
scotty(-:
Scotty,
Thanks for the quick reply. :hr:
I used your code, and the preloader works, but it does not ever reach 100% and it doesn’t dissapear off the screen.
Take a look:
http://www.vuhuynh.com (the preloader is on the bottom right)
Thanks again.
I’ve attached the .fla for your enjoyment ; ).
sorry…here it is. I couldn’t include any of the images…the file would have been too big.
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
percent = Math.round((l/t)*100);
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
loadInfo.text = ""; //Add this
} else {
loadInfo.text = percent+" % loaded";
loadBar._xscale= percent;
}
}
do this and the text will disappear when the 100% is reached, you don’t see 100% but who cares you get to see the picture>>>