Троящийся курсор - ForumOpen.Org.Ru Самый большой форум в России
Мини-профиль
Воскресенье
19.05.2024
21:16

Логин:
Пароль:
[ Управление профилем ]


Мини-чат
300


Наш опрос
Какой браузер лучше ?
Всего ответов: 20


Оптимизация
Сайт оптимизирован почти под все современные Интернет-браузеры:

warp37

warp37

warp37



Статистика


Приветствую Вас, Гость · RSS 19.05.2024, 21:16
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]

  • Страница 1 из 1
  • 1
ForumOpen.Org.Ru Самый большой форум в России » Мастерская » Скрипты для Ucoz » Троящийся курсор
Троящийся курсор
KadilakДата: Среда, 16.02.2011, 15:54 | Сообщение # 1
Генерал-майор
Группа: Администратор
Сообщений: 447
Награды: 0
Репутация: 93
Статус:

Между

Code
<head> и </head>

Вставляйте следующий код:

Code
<html>  
<head>  
<title>Троящийся курсор</title>  
</head>  
<body>  
<script language="Javascript1.2">  
<!--  
var isNS = (navigator.appName == "Netscape");  
layerRef = (isNS) ? "document" : "document.all";  
styleRef = (isNS) ? "" : ".style";  
var queue = new Array();  
var NUM_OF_TRAIL_PARTS = 5  
for (x=1; x < 6; x++) {   
eval("trailSpriteFrame" + x + " = new Image(28,36);");  
eval("trailSpriteFrame" + x + ".src = '../gif/maus.gif';");  
}  
function trailSpriteObj(anID) {  
this.trailSpriteID = "trailSprite" + anID;   
this.imgRef = "trailSprite" + anID + "img";   
this.currentFrame = 1;   
   this.animateTrailSprite = animateTrailSprite;   
}  
function animateTrailSprite() {  
if (this.currentFrame <6 ) {   
if (isNS) {eval("document." + this.trailSpriteID +".document['"+ this.imgRef + "'].src = trailSpriteFrame" + this.currentFrame + ".src");}   
else {eval("document['" + this.imgRef + "'].src = trailSpriteFrame" + this.currentFrame + ".src"); }  
this.currentFrame ++;   
   }   
else {eval(layerRef + '.' + this.trailSpriteID + styleRef + '.visibility = "hidden"');  
}   
}  
function processAnim() {  
   for(x=0; x < NUM_OF_TRAIL_PARTS; x++)  
   queue[x].animateTrailSprite();  
}  
function processMouse(e) {  
   currentObj = shuffleQueue();  
   if (isNS) {eval("document." + currentObj + ".left = e.pageX ;");  
   eval("document." + currentObj + ".top = e.pageY;");  
} else {eval("document.all." + currentObj + ".style.pixelLeft = event.clientX + document.body.scrollLeft;");  
   eval("document.all." + currentObj + ".style.pixelTop = event.clientY + document.body.scrollTop;");  
}  
}  
function shuffleQueue() {  
lastItemPos = queue.length - 1;  
lastItem = queue[lastItemPos];  
for (i = lastItemPos; i>0; i--)   
queue[i] = queue[i-1];  
queue[0] = lastItem;  
queue[0].currentFrame = 1;   
eval(layerRef + '.' + queue[0].trailSpriteID + styleRef + '.visibility = "visible"');   
return queue[0].trailSpriteID;  
}  

function init() {  
for(x=0; x<NUM_OF_TRAIL_PARTS; x++)   
queue[x] = new trailSpriteObj(x+1) ;  
if (isNS) { document.captureEvents(Event.MOUSEMOVE); }  
document.onmousemove = processMouse;  
setInterval("processAnim();",25);  
}   
window.onload = init;  
//-->  
</script>  
<div id="trailSprite1" style="position: absolute; height:28px; width:36px;z-index: 100"><img src="../gif/maus.gif" border="0" name="trailSprite1img"></div>  
<div id="trailSprite2" style="position: absolute; height:28px; width:26px;z-index: 10"><img src="../gif/maus.gif" border="0" name="trailSprite2img"></div>  
<div id="trailSprite3" style="position: absolute; height:28px; width:36px;z-index: 10"><img src="../gif/maus.gif" border="0" name="trailSprite3img"></div>  
<div id="trailSprite4" style="position: absolute; height:28px; width:36px;z-index: 10"><img src="../gif/maus.gif" border="0" name="trailSprite4img"></div>  
<div id="trailSprite5" style="position: absolute; height:28px; width:36px;z-index: 10"><img src="../gif/maus.gif" border="0" name="trailSprite5img"></div>  
<!--s_links--><a href="http://kreditpodzalog.com/" target="_blank">недвижимость под залог на деньги</a><!--/s_links--></body>  
</html>




 
ForumOpen.Org.Ru Самый большой форум в России » Мастерская » Скрипты для Ucoz » Троящийся курсор
  • Страница 1 из 1
  • 1
Поиск: