
################SPACEMARC####################
# Spacemarc                                 #
# http://www.spacemarc.it                   #
#                                           #
# Scritte sfumate                           #
#                                           #
#############################################




Di seguito  riportato un esempio di pagina web che contiene tale effetto. Notare l'inserimento di un particolare Style (nell'head) e di un Javascript 1.2 (compatibile sia con Internet Explorer che con Netscape Navigator).
Nel body va inserito: onLoad="introduction()" e il successivo posizionamento in un punto della pagina in cui volete l'effetto.




<html>

<head>
<title>Spacemarc - scritte sfumate</title>

<style type="text/css"> 
BODY { background : #000000 } 
#Last { position: absolute; visibility: visible; z-index: 10; top:50px;left:120px } 
.small { font: 20pt Arial } 
.small2 { font: 14pt Arial }
</style> 

<script type="text/javascript" language="javascript 1.2"> 
/*
by Spacemarc http://www.spacemarc.it
*/
ie4 = ((navigator.appName == "Microsoft Internet Explorer") && 
(parseInt(navigator.appVersion) >= 4 )) 
ns4 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4 )) 

if (ns4) { 
layerRef="document.layers"; 
styleRef=""; 
} else { 
layerRef="document.all"; 
styleRef=".style"; 
} 

var convert = new Array(); 
var hexbase = new Array("0", "1", "2", "3", "4", "5", "6", "7", 
"8", "9", "A", "B", "C", "D", "E", "F"); 
var value=0; 
var rgb; 


for (x=0; x<16; x++) { 
for (y=0; y<16; y++) { 
convert[value] = hexbase[x] + hexbase[y]; 
value++; 
} 
} 

function changeContent(wColor,message) { 
rgb = "#"+convert[wColor]+"0000"; 
if (ns4) { 
eval(layerRef + '["Last"]' + styleRef + '.document.write("<font color="+rgb+">"+message+"</font>")'); 
eval(layerRef + '["Last"]' + styleRef + '.document.close()'); 
} else { 
eval('Last.innerHTML="<font color="+rgb+">"+message+"</font>"'); 
} 
} 

function Fade(wColor, inout, speed, textDisp, topx, leftx) { 
if (ns4) { 
eval(layerRef + '["Last"]' + styleRef + '.top = topx'); 
eval(layerRef + '["Last"]' + styleRef + '.left = leftx'); 
} else { 
eval(layerRef + '["Last"]' + styleRef + '.posTop = topx') 
eval(layerRef + '["Last"]' + styleRef + '.posLeft = leftx'); 
} 


if (inout == 1) { 
if (wColor < 255) { 
wColor+=speed; 
if (wColor > 255) wColor=255; 
changeContent(wColor, textDisp); 

setTimeout("Fade("+wColor+","+inout+","+speed+",'"+textDisp+"',"+topx+","+leftx+")",0); 
} 
} else { 
if (wColor > 0) { 
wColor-=speed; 
if (wColor < 0) wColor=0; 
changeContent(wColor, textDisp); 

setTimeout("Fade("+wColor+","+inout+","+speed+",'"+textDisp+"',"+topx+","+leftx+")",0); 
} 
} 

} 

/* 
* Statement : Fade("Last", initialvalue [0-255], fade[fadein=1,fadeout=0], speed, textDisp string); 
*/ 
function introduction() { 
Fade(255, 0, 4, '<span class=small>Questo  il primo messaggio</span>', 50, 20); 
setTimeout("Fade(255, 0, 4, '<span class=small2>Qui ci va un altra frase</span>', 120, 10)",7000); 
setTimeout("Fade(0, 1, 4, '<span class=small>la terza scritta</span>', 70, 20)",10000); 
setTimeout("Fade(255, 0, 4, '<span class=small2><b>Ultimo messaggio!</b></span>', 170, 20)",15000); 
} 

</script> 

</HEAD> 

<BODY bgcolor="white" onLoad="introduction()"> 

<p align="center">&nbsp;</p>
  <div align="center"><center>
    
  </center></div>

<div ID=Last style="left: 13px; top: 160px; width: 751px; height: 19px"> </div> 

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

</body> 
</html>
