PDA

View Full Version : Fading image mod!


Atian
05-21-2002, 03:24 PM
<script language="JavaScript1.2">
/*
gradual image fading code [better wash my mouth][better wash my mouth][better wash my mouth][better wash my mouth].
*/

nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

/* object - image to be faded (actual object, not name);
* destop - destination transparency level (ie 80, for mostly solid)
* rate - time in milliseconds between trasparency changes (best under 100)
* delta - amount of change each time (ie 5, for 5% change in transparency)
*/

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
if (object != "[object]"){ //do this so I can take a string too
setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
return;
}

clearTimeout(nereidFadeTimers[object.sourceIndex]);

diff = destOp-object.filters.alpha.opacity;
direction = 1;
if (object.filters.alpha.opacity > destOp){
direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;

if (object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
}
}
</script>


:) I like this :) :hurt:

Neo
05-22-2002, 08:23 PM
Demo Site?

Xanthine
05-22-2002, 08:34 PM
Originally posted by neo
Demo Site?

Yes please.

Atian
05-24-2002, 01:08 PM
umm,my board is temporaly down,but ill get you one once its up again ok?

PET
05-25-2002, 06:49 PM
See this !
http://dhtmlpost.webcab.ro/navig/fi/fi.htm
& demo:

http://dhtmlpost.webcab.ro/navig/fi/demo.htm

Xelation
05-25-2002, 08:49 PM
that kicks ass, I have to find a way to implement that into my board

Highlander
05-29-2002, 04:21 AM
how to implement in in the Board..that all images wich are only posted appears like this..??

but the Banbners and other pictures have to stay normal !

Dyntheos
07-04-2002, 11:44 AM
ANyone can pint out how this is implemented on a forum, the effect is nice but i would like some help in getting it set up, or at least some basic instructions. A demo and a script does not make a mod.

Gary King
07-05-2002, 03:54 PM
Is there no explanation to how we can accomplished this?? :ermm:

Vinney
07-09-2002, 08:32 PM
Everyone go look at my post :

https://vborg.vbsupport.ru/showthread.php?s=&threadid=40872

Gary King
07-09-2002, 08:33 PM
hmm, ok Vinney hehe :)

Dyntheos
07-10-2002, 03:18 AM
I actually loked for this because a few steps were left out, namely the <img> tag code. A script does not make the effect by itself.

This is Dead easy to do if you have the right tool.

below is a txt file taken of Dynamicdrive.com a free DHTML site with kinds of pretty effects.

If you want fade in about 1 minute then have a look at the file below.