Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > General > Animation and Effects

Reply
 
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Old 10-10-2005, 11:07 AM   #1
smegedd
Registered User
 
smegedd's Avatar
 
Join Date: Oct 2005
Posts: 2
Cool Fade to White Picture Gallery effect

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
smegedd is offline   Reply With Quote
Old 10-10-2005, 07:35 PM   #2
blue_halo
...I'm getting better
 
Join Date: Mar 2005
Posts: 42
Default

I can't sit and try to figure it out at the moment (and you probably wouldn't want me to either, I'm no AS master) but I found a source file by Senocular a while back dealing with this, infact he has it available on his site for download. If you look around in there I'm sure you could figure something out. Sorry I can't be of much more help, but this should atleast point you in the right direction.

http://www.senocular.com/flash/source.php?id=0.141
blue_halo is offline   Reply With Quote
Old 10-11-2005, 09:46 AM   #3
smegedd
Registered User
 
smegedd's Avatar
 
Join Date: Oct 2005
Posts: 2
Default Many Thanks

Halo this is exactly what I have been looking for Cheerz Bud!.

Would still love to understand how the Photoshop template works.

Thanks again M8
smegedd is offline   Reply With Quote
Old 10-28-2005, 03:13 AM   #4
nmaxfield
Registered User
 
Join Date: May 2005
Posts: 2
Default

I was looking for the exact same thing. Thanks so much.
nmaxfield is offline   Reply With Quote
Old 01-09-2007, 09:22 PM   #5
KRESAT
Registered User
 
Join Date: Jan 2007
Posts: 1
Default

Where and how can i change the fade color at this script?
Help me please

// 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);
}
};
};


Is the same above, but i dont know how to change colors.
Thanks
________
Sorry my mistakes, i'm not english
KRESAT is offline   Reply With Quote
Old 02-21-2007, 07:30 PM   #6
gd1008
Registered User
 
Join Date: Feb 2007
Posts: 3
Exclamation

I am also trying to find out how to change color from white to black in this script.

Can someone help please!!!!!
gd1008 is offline   Reply With Quote
Old 02-21-2007, 09:12 PM   #7
gd1008
Registered User
 
Join Date: Feb 2007
Posts: 3
Default

It seems like "display.class.as" not the "colorFadePrototypes.as" has to be modified.
I was trying to modify Display.prototype.fadein function and Display.prototype.fadeout in "display.class.as" file and was able to control how long fadein-fadeout lasts, but couldn't change from white to black. I assumed that I should change from 255 to 0, but it didn't help.

Asking for help again.
gd1008 is offline   Reply With Quote
Old 02-22-2007, 02:54 PM   #8
gd1008
Registered User
 
Join Date: Feb 2007
Posts: 3
Default modifying fadeout color

I finally was able to change fadeout color by modifying Display.prototype.fadeout function in display.class.as file.
I changed following line in this function:
this.image_mc.hold.colorFade(0, 100, 0, 100, 0, 100, 100, 0, this, 'scaleParts');

Unfortunately I still couldn't use newly generated gallery.swf since page titles disappeared after that.
gd1008 is offline   Reply With Quote
Old 07-31-2009, 10:35 AM   #9
Dirk2512
Registered User
 
Join Date: Jul 2009
Posts: 1
Default Gallery

Hi can some one tell me what i need to make my flash gallery to open the the web page tinted out and the galleryin the foreground, for a better explanaition look at www.game.co.uk and click open gallery.

Thanks In advance
Dirk2512 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:22 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.