Hi,
Ive followed the kirupa slideshow tutorial here:
http://www.kirupa.com/developer/mx2004/thumbnails.htm
Original source: http://www.kirupa.com/developer/mx2004/code/thumbnail_final.zip
But I can’t seem to make the images colourburn in.
I usually use this function:
MovieClip.prototype.colorFadeIn = function(ease) {
var t = 0;
// var ease = 40;
var myColor = new Color(this);
var cto = myColor.getTransform();
myColor.setTransform({ra:100, rb:255, ga:100, gb:255, ba:100, bb:255, aa:100, ab:0});
var cWhite = myColor.getTransform();
this._alpha = 0;
this.onEnterFrame = function() {
this._alpha += 10;
if (this._alpha>100) {
this._alpha = 100;
t++;
for (var c in cWhite) {
cWhite[c] += (cto[c]-cWhite[c])/ease;
}
myColor.setTransform(cWhite);
if (t>400) {
myColor.setTransform(cto);
delete this.onEnterFrame;
}
}
};
};
So I tried it in the code like this:
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture.colorFadeIn(5);
}
}
};
But it doesn’t work, any ideas?
Thanks