Minggu, 23 Desember 2012

cara membuat animasi kursor berantai

Selamat subuh agan-agan semua pada kali ini saya akan berbagi hal tentang bagaimana cara membuat animasi kursor berantai, langsung saja pada pokok pemasalahan ya, karena sebentar lagi hari siang dan mau berangkat ngator atau apalah hahahaaa, lanjut ke TKP;

  • Masuk ke dashboard pilih template lalu Edit HTML
  • copy kode dibawah ini lalu letakkan sebelum ]]></b:skin> atau persis setelah <body>

Spoiler kursor:
 <script>
A=document.getElementById
B=document.all;
C=document.layers;
bunder=new Array("bunder1.gif",38,35,"bunder2.gif",30,31,"bunder3.gif",28,26,"bunder4.gif",22,21,"bunder5.gif",16,16,"bunder6.gif",10,10)
var posisix=15
var posisiy=10
kursor=parseInt(bunder.length/3)
ratarata=50
ie5fix1=0;
ie5fix2=0;
tepikanan=B? document.body.lebarKursor-bunder[1] : window.innerWidth-bunder[1]-20
tepikiri=B? document.body.scrollTop+document.body.tinggiKursor-bunder[2] : window.pageYOffset+window.innerHeight-bunder[2]
for (i=0;i<kursor;i++){
isiKursor("CUR"+i,i*10,i*10,i*3+1,i*3+2,"","<img src='"+bunder[i*3]+"' width="+bunder[(i*3+1)]+" height="+bunder[(i*3+2)]+" border=0>")
}
function isiKursor(N,Xp,Yp,W,H,At,HT,Op,St){
with (document){
write((!A && !B) ? "<layer id='"+N+"' left="+Xp+" top="+Yp+" width="+W+" height="+H : "<div id='"+N+"'"+" style='position:absolute;left:"+Xp+"; top:"+Yp+"; width:"+W+"; height:"+H+"; ");
if(St){
if (C)
write(" style='");
write(St+";' ")
}
else write((A || B)?"'":"");
write((At)? At+">" : ">");
write((HT) ? HT : "");
if (!Op)
isiKursor2(N)
}
}
function isiKursor2(){
document.write((A || B)?"</div>":"</layer>")
}
function posisixx(N){
if (A)
return parseInt(document.getElementById(N).style.left)
else if (B)
return parseInt(B[N].style.left)
else
return C[N].left
}
function posisiyy(N){
if (A)
return parseInt(document.getElementById(N).style.top)
else if (B)
return parseInt(B[N].style.top)
else
return C[N].top
}
function memindahkanisi(N,DX,DY){
c=(A)? document.getElementById(N).style : (B)? B[N].style : (C)? C[N] : "";
if (!B){
tepikanan=window.innerWidth-bunder[1]-20
tepikiri=window.pageYOffset+window.innerHeight-bunder[2]
}
c.left=Math.min(tepikanan, DX+posisix);
c.top=Math.min(tepikiri, DY+posisiy);
}
function lingkaran(){
if (document.all&&window.print){
ie5fix1=document.body.scrollLeft;
ie5fix2=document.body.scrollTop;
}
for (i=0;i<(kursor-1);i++){
memindahkanisi("CUR"+i,posisixx("CUR"+(i+1)),posisiyy("CUR"+(i+1)))
}
}
function posisiKursorBaru(e){
memindahkanisi("CUR"+(kursor-1),(B)?event.clientX+ie5fix1:e.pageX+2,(B)?event.clientY+ie5fix2:e.pageY+2)
}
function tepibrowserIE(){
tepikanan=document.body.lebarKursor-bunder[1]
tepikiri=document.body.scrollHeight-bunder[2]
}
if (B){
window.onload=tepibrowserIE
window.onresize=tepibrowserIE
}
if(document.layers)
document.captureEvents(Event.MOUSEMOVE)
document.onmousemove=posisiKursorBaru
setInterval("lingkaran()",ratarata)
</script>



  • Lalu Save


  • "Watch your thoughts; they become words. Watch your words; they become actions. Watch your actions; they become habits. Watch your habits; they become character. Watch your character; it becomes your destiny." LaoTzu
    Share this article

    0 komentar:

    Posting Komentar

     
    Copyright © 2014 Clickme More • All Rights Reserved.
    Clickme More | Template Design by BTDesigner • Powered by Blogger
    back to top