smegedd
10-10-2005, 11:07 AM
Hi, Hope some one can help with this and I think its worth while. I have just discovered the built in templates in Photoshop CS2 for an Online Web Gallery. If you have it you will know there are two flash templates and a third available to download. This question is regarding the 'Fade to white' effect these galleries user when changing from one picture to another. I think the effect is subtle but beautiful and I want to recreate this effect for other uses. I just want to have a picture and use this fade to white effect. It actually looks more like you are turning the exposure up gradually to complete white.
I have downloaded the source files and it seems this effect is achieved through a single action script file that is included in the first frame of the flash file.
I do not understand the script but wonder if anyone can figure out how to apply this effect in a simple 1 picture movie?
The script is:
// This handles the image dissolve to white effect
// usage
// image_mc.colorFade(100, 0, 100, 0, 100, 0, 100, 0, this, 'done');
MovieClip.prototype.colorFade = function(r1, r2, g1, g2, b1, b2, a1, a2, obj, callback) {
var c = new Color(this);
var tV = [r1, r2, g1, g2, b1, b2, a1, a2];
var speed = 1.5;
var margin = 10;
this.onEnterFrame = function() {
cV = [c.getTransform().ra, c.getTransform().rb, c.getTransform().ga, c.getTransform().gb, c.getTransform().ba, c.getTransform().bb, c.getTransform().aa, c.getTransform().ab];
change = {ra:tV[0]-(tv[0]-cV[0])/speed, rb:tV[1]-(tv[1]-cV[1])/speed, ga:tV[2]-(tv[2]-cV[2])/speed, gb:tV[3]-(tv[3]-cV[3])/speed, ba:tV[4]-(tv[4]-cV[4])/speed, bb:tV[5]-(tv[5]-cV[5])/speed, aa:tV[6]-(tv[6]-cV[6])/speed, ab:tV[7]-(tv[7]-cV[7])/speed};
c.setTransform(change);
if (cV[0]>tV[0]-margin && cV[0]<tV[0]+margin && cV[1]>tV[1]-margin && cV[1]<tV[1]+margin && cV[2]>tV[2]-margin && cV[2]<tV[2]+margin && cV[3]>tV[3]-margin && cV[3]<tV[3]+margin && cV[4]>tV[4]-margin && cV[4]<tV[4]+margin && cV[5]>tV[5]-margin && cV[5]<tV[5]+margin) {
obj[callback]();
delete (this.onEnterFrame);
}
};
};
The effect can also be demonstrated at http://www.thisisventure.co.uk/gallery/default.asp
Hope some clever bod out there can help
I have downloaded the source files and it seems this effect is achieved through a single action script file that is included in the first frame of the flash file.
I do not understand the script but wonder if anyone can figure out how to apply this effect in a simple 1 picture movie?
The script is:
// This handles the image dissolve to white effect
// usage
// image_mc.colorFade(100, 0, 100, 0, 100, 0, 100, 0, this, 'done');
MovieClip.prototype.colorFade = function(r1, r2, g1, g2, b1, b2, a1, a2, obj, callback) {
var c = new Color(this);
var tV = [r1, r2, g1, g2, b1, b2, a1, a2];
var speed = 1.5;
var margin = 10;
this.onEnterFrame = function() {
cV = [c.getTransform().ra, c.getTransform().rb, c.getTransform().ga, c.getTransform().gb, c.getTransform().ba, c.getTransform().bb, c.getTransform().aa, c.getTransform().ab];
change = {ra:tV[0]-(tv[0]-cV[0])/speed, rb:tV[1]-(tv[1]-cV[1])/speed, ga:tV[2]-(tv[2]-cV[2])/speed, gb:tV[3]-(tv[3]-cV[3])/speed, ba:tV[4]-(tv[4]-cV[4])/speed, bb:tV[5]-(tv[5]-cV[5])/speed, aa:tV[6]-(tv[6]-cV[6])/speed, ab:tV[7]-(tv[7]-cV[7])/speed};
c.setTransform(change);
if (cV[0]>tV[0]-margin && cV[0]<tV[0]+margin && cV[1]>tV[1]-margin && cV[1]<tV[1]+margin && cV[2]>tV[2]-margin && cV[2]<tV[2]+margin && cV[3]>tV[3]-margin && cV[3]<tV[3]+margin && cV[4]>tV[4]-margin && cV[4]<tV[4]+margin && cV[5]>tV[5]-margin && cV[5]<tV[5]+margin) {
obj[callback]();
delete (this.onEnterFrame);
}
};
};
The effect can also be demonstrated at http://www.thisisventure.co.uk/gallery/default.asp
Hope some clever bod out there can help