"Chove na Flor de guacira jardineira"

contribuição de Denize Rezende

 

Credits:

° image: "Flor Solitaria" - (exercise on computer art software) by Guacira Sampaio Rocha
° mid: "so_louco" (found for free, in the net)
° script author:
Phil Richards and Gerard Ferrandez
° prepared, commented and posted (as it is in this page) by: Denize Rezende

 

1) Dentro das tags "<head> </head>" coloque:

"<HEAD><TITLE>chove na flor</TITLE>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<STYLE>BODY {
COLOR: #4c4849; FONT-FAMILY: Georgia, Times New Roman, Times, serif; FONT-SIZE: 24px
}
</STYLE>

<SCRIPT>
//Rain on the window
//Phil Richards October 2000
//(thanks to Gerard Ferrandez for his improvements to the round lens script, which was the starting point for this one)
//

var drop_size=10;
var max_drops=10;
var prescale=1.1;
var gravity=0.3;

var en=0;
var pw, ph, cxp, cyp;


function init(){
pw=pic.width/prescale;
ph=pic.height/prescale;
pic.style.posWidth=pw;
pic.style.posHeight=ph;
resize();
d=new Array();
build(0);
document.onresize=resize;
setInterval("for(i in d)d[i].fall();",50);
setInterval("resize()",1000);
}

function build(n){
d[n]=new raindrop(n,drop_size+(drop_size/5)*Math.random(),pic.src);
if(n<max_drops)setTimeout("build("+(n+1)+")",2000);
}

function resize(){
cx=document.body.clientWidth/2;
cy=document.body.clientHeight/2;
cxp=cx-pw/2;
cyp=cy-ph/2;
pic.style.posLeft=cxp;
pic.style.posTop=cyp;
}

function raindrop_fall(){
with(this){
y+=vy;
x+=0.2;
vy+=gravity;
if(y>ph){
vy=0;
x=r+(pw-r-r)*Math.random();
y=r+(ph-r-r)*Math.random();
}
lens.move(x,y);
}
}

function raindrop(n,r,img){
this.x=0;
this.y=10000;
this.vy=0;
this.r=r;
this.lens=new lens(r,0.9,img,2);
this.fall=raindrop_fall;
}

function move_lens(x,y){
with(this){
for(i in e){
with(e[i]){
ss.posLeft=cxp+x-w;
ss.posTop=cyp+y-h;
is.posLeft=w-m*x;
is.posTop=h-m*y;
}
}
}
}

function lens(r,m,img,q){
this.e=new Array();
lastex=0;
for(ey=r-1; ey>=0; ey-=q){
theta=Math.asin(ey/r);
ex=Math.round(0.8*r*Math.cos(theta));
if(ex!=lastex)this.e[en]=new element(en++,lastex,ey,m-(ey/r),img);
lastex=ex;
}
this.move=move_lens;
}

function element(n,w,h,m,img){
this.n=n;
this.w=w;
this.h=h;
this.m=m;
document.body.insertAdjacentHTML("beforeEnd","<span style='position:absolute;overflow:hidden;left:-1000;width:"+(2*w)+";height:"+(2*h)+";'><img src='"+img+"' style='position:absolute;width:"+(m*pw)+";height:"+(m*ph)+"'></span>");
obj=document.body.all.tags("SPAN")[n];
this.ss=obj.style;
this.is=obj.children[0].style;
}

</SCRIPT>

<META content="MSHTML 5.00.3013.2600" name=GENERATOR></HEAD>

2) Logo após coloque:

" <BODY bgColor=#4c4849 onload=init() scroll=yes>
<DIV><BR></DIV><BGSOUND balance=0 loop=infinite
src="
defina aqui o caminho do som.mid" volume=-1000><BR><BR><IMG
id=pic src="
aqui o caminho da imagem"
style="LEFT: -100px; POSITION: absolute; VISIBILITY: visible; Z-INDEX: -1"></BODY>
"

3) Feche com a tag: " </HTML> "

Atenção: não esqueça de desprezar todas as aspas que não estejam na cor branca.

Esse script pode perfeitamente ser copiado dentro da aba Origem de seu Outlook Express, e ser enviado, com fundo musical, como mensagem aos seus amigos.