 |
Cursor Trail |
 |
2. July 2007, 12:23
|
#1 (permalink)
|
|
Uye Olmayan
Uye No:
Mesajlar: n/a
Seviye: -INF [ ] Aktiflik: NAN / -INF Güç: -INF / -INF Deneyim: NAN%
|
Cursor Trail
bu konuda arkadaşlar bize ingilzce olaraktan mouse yani cursor e yapılan efectten bahsetmeye çalışmışlar siz yine görmiyorsunuz ama cursor oynatıldıkça 1-2 saniyelik izler bırakıyor arkasında.
Description: Add this classic Windows effect to your website! It renders a trailing cursor whenever the user moves his mouse, and only ONE image is used to create it (sure looks like more than that!). Enjoy this great cross browser script.
Example: Move your cursor!
Directions
Step 1: Insert the below into the <HEAD> section of your page:
HTML-Kodu:
<style type="text/css">
BODY {overflow: scroll; overflow-x: hidden;}
</style>
Step 2: Insert the below into the <BODY> section of your page:
HTML-Kodu:
<script language="JavaScript1.2">
<!--
/*
Submitted by Marcin Wojtowicz [one_spook@hotmail.com]
Featured on JavaScript Kit (http://javascriptkit.com)
For this and over 400+ free scripts, visit http://javascriptkit.com
*/
var trailLength = 8 // The length of trail (8 by default; put more for longer "tail")
var path = "cursor.gif" // URL of your image
// do NOT modify anything beyond this point
var i*** = false,isNav = false,range = "all.",style = ".style",i,d = 0
var topPix = ".pixelTop",leftPix = ".pixelLeft",images,storage
if (document.layers) { // browser sniffer
isNav = true,range = "layers.",style = "",topPix = ".top",leftPix = ".left"
} else if (document.all) {
i*** = true
}
function initTrail() { // prepares the script
images = new Array() // prepare the image array
for (i = 0; i < parseInt(trailLength); i++) {
images[i] = new Image()
images[i].src = path
}
storage = new Array() // prepare the storage for the coordinates
for (i = 0; i < images.length*3; i++) {
storage[i] = 0
}
for (i = 0; i < images.length; i++) { // make divs for IE and layers for Navigator
(i***) ? document.write('<div id="obj' + i + '" style="position: absolute; z-Index: 100; height: 0; width: 0"><img src="' + images[i].src + '"></div>') : document.write('<layer name="obj' + i + '" width="0" height="0" z-index="100"><img src="' + images[i].src + '"></layer>')
}
trail()
}
function trail() { // trailing function
for (i = 0; i < images.length; i++) { // for every div/layer
eval("document." + range + "obj" + i + style + topPix + "=" + storage[d]) // the Y-coordinate
eval("document." + range + "obj" + i + style + leftPix + "=" + storage[d+1]) // the X-coordinate
d = d+2
}
for (i = storage.length; i >= 2; i--) { // save the coordinate for the div/layer that's behind
storage[i] = storage[i-2]
}
d = 0 // reset for future use
var timer = setTimeout("trail()",10) // call recursively
}
function processEvent(e) { // catches and processes the mousemove event
if (i***) { // for IE
storage[0] = window.event.y+document.body.scrollTop+10
storage[1] = window.event.x+document.body.scrollLeft+10
} else { // for Navigator
storage[0] = e.pageY+12
storage[1] = e.pageX+12
}
}
if (isNav) {
document.captureEvents(Event.MOUSEMOVE) // Defines what events to capture for Navigator
}
if (i*** || isNav) { // initiates the script
initTrail()
document.onmousemove = processEvent // start capturing
}
//-->
</script>
You should also grab and upload the following image into your webpage directory:
Viola!
|
|
|
|
 |
| Seçenekler |
|
|
| Stil |
Konuyu değerlendir |
Normal
|
|
Yetkileriniz
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML-KodlarıKapalı
|
|
|
|
Bütün Zaman Ayarları WEZ +3 olarak düzenlenmiştir. Şu Anki Saat: 05:00 . |
|
|
|
173, 171, 172, 170, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 249, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 259, 52, 53, 54, 56, 57, 58, 248, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 155, 156, 157, 158, 237, 168, 183, 179, 160, 175, 178, 167, 162, 163, 164, 165, 166, 1, 176, 177, 180, 181, 182, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 201, 200, 199, 202, 203, 204, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 222, 219, 220, 221, 229, 230, 231, 232, 233, 234, 235, 236, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 250, 251, 252, 253, 254, 255, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 276, 277, 278,
|
|