Пятница
29.03.2024, 15:10
Приветствую Вас Гость | RSS
Главная Етот скрипт позволяет вискакивать смайлу(картинке) на страни - Форум Регистрация Вход
Скачать фильмы
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Модератор форума: ImmortaL, Warchi  
Форум » Вебмастерам » Скрипты для Ucoz » Етот скрипт позволяет вискакивать смайлу(картинке) на страни
Етот скрипт позволяет вискакивать смайлу(картинке) на страни
ImmortaLДата: Четверг, 16.04.2009, 17:35 | Сообщение # 1
Сообщений: 453
Уважение
[ 7 ]
Етот скрипт позволяет вискакивать смайлу(картинке) на странице через определённое время
Вставлять между и
Code

Етот код прописать в блокноте и сохранить так code.txt, и потом закинуть на ФТП в папку smile

Етот код прописать в блокноте и сохранить так code.txt, и потом закинуть на ФТП в папку smile

Code
var shat1=new Image(18, 33);   
var shat2=new Image(18, 33);   
shat1.src="Первая картинка";   
shat2.src="Вторая картинка";   
document.write("<div id='shaiten'><img alt='Шайтаныч' width='18' height='33' border='0'/></div>");   
document.getElementById('shaiten').style.position='absolute';   
var sHeight2=screen.height;   
var sWidth2=screen.width;   
document.getElementById('shaiten').style.top=sHeight2*Math.random()+10+'px';   
document.getElementById('shaiten').style.left=sWidth2*Math.random()+10+'px';   
document.getElementById('shaiten').style.display='none';   
document.getElementById('shaiten').style.filter="alpha(opacity:0)";   
document.getElementById('shaiten').style.KHTMLOpacity="0";   
document.getElementById('shaiten').style.MozOpacity="0";   
document.getElementById('shaiten').style.opacity="0";   
document.getElementById('shaiten').getElementsByTagName('img')[0].src=shat1.src;   
setTimeout("pshih2(1, 0);", 10);   
function smex2(pik2, kol2){   
document.getElementById('shaiten').getElementsByTagName('img')[0].src=shat2.src;   
if(kol2<20){   
if(pik2){   
document.getElementById('shaiten').style.top=parseInt(document.getElementById('shaiten').style.top)-2+'px';    
pik2=0;   
}else{   
document.getElementById('shaiten').style.top=parseInt(document.getElementById('shaiten').style.top)+2+'px';   
pik2=1;   
}   
setTimeout('smex2('+pik2+', '+(kol2+1)+');', 50);   
}else{   
document.getElementById('shaiten').getElementsByTagName('img')[0].src=shat1.src;   
setTimeout("pshih2(0, 100);", 3000);   
}   
}   
function pshih2(vis2, value2){   
if(vis2){   
if(value2==0){   
if(document.body.scrollT2op){   
var scrollT2=document.body.scrollT2op;   
}else if(window.pageYOffset){   
var scrollT2=window.pageYOffset;   
}else{   
scrollT2=0;   
}   
document.getElementById('shaiten').style.top=parseInt(document.getElementById('shaiten').style.top)+scrollT2+'px';   
}   
if(value2>=100){   
smex2(1, 0);   
document.getElementById('shaiten').style.filter="alpha(opacity:100)";   
document.getElementById('shaiten').style.KHTMLOpacity="1";   
document.getElementById('shaiten').style.MozOpacity="1";   
document.getElementById('shaiten').style.opacity="1";   
}else{   
document.getElementById('shaiten').style.display='block';   
value2=value2+4;   
if(value2<10){var b='0';}else{var b='';}   
document.getElementById('shaiten').style.filter="alpha(opacity:"+value2+")";   
document.getElementById('shaiten').style.KHTMLOpacity="0."+b+value2;   
document.getElementById('shaiten').style.MozOpacity="0."+b+value2;   
document.getElementById('shaiten').style.opacity="0."+b+value2;   
setTimeout('pshih2(1, '+value2+')', 1);   
}   
}else{   
if(value2<=0){   
document.getElementById('shaiten').style.display='none';   
document.getElementById('shaiten').style.filter="alpha(opacity:0)";   
document.getElementById('shaiten').style.KHTMLOpacity="0";   
document.getElementById('shaiten').style.MozOpacity="0";   
document.getElementById('shaiten').style.opacity="0";   
document.getElementById('shaiten').style.top=sHeight2*Math.random()+10+'px';   
document.getElementById('shaiten').style.left=sWidth2*Math.random()+10+'px';   
setTimeout("pshih2(1, 1);", 2000);   
}else{   
value2=value2-4;   
if(value2<10){var b='0';}else{var b='';}   
document.getElementById('shaiten').style.filter="alpha(opacity:"+value2+")";   
document.getElementById('shaiten').style.KHTMLOpacity="0."+b+value2;   
document.getElementById('shaiten').style.MozOpacity="0."+b+value2;   
document.getElementById('shaiten').style.opacity="0."+b+value2;   
setTimeout('pshih2(0, '+value2+')', 1);   
}   
}   
}


Форум » Вебмастерам » Скрипты для Ucoz » Етот скрипт позволяет вискакивать смайлу(картинке) на страни
  • Страница 1 из 1
  • 1
Поиск:


Copyright MyCorp © 2024
Скачать фильмы