Home » » Membuat Gambar Animasi Berterbangan

Membuat Gambar Animasi Berterbangan


Caranya adalah sebagai berikut :

1. Login ke akun Blog anda.
2. Pilih Rancangan, Add Gadget kemudian klik HTML/Java Script.
3. Copy Paste script di bawah ini ke dalam gadget HTML/Java Script anda.
<div id='abeja' style='position:absolute; top:0px; left:0px; visibility:hidden; z-index:10'><a href='MASUKKAN URL ANDA DISINI' target='top' onclick='abejacazada()'><img src="https://lh3.googleusercontent.com/_u4rBCfM4eII/TaW1yrJ_FuI/AAAAAAAABnI/2SkiTXSsM3o/Animated%20Fly.gif" style="width:52px; height:51px; border:0;" /></a></div>

<center><input name="detener" type="button"
onclick="abejacazada()" value="Off" /><input name="volar" type="button" onclick="iniciar()" value="On" /></center>

<script type='text/javascript'>
// Juan Rodríguez [Consultor]
<!-- inicio
var velocidad=50;var cambio=100;var CamHorMax=25;var CamVerMax=25;var hor,ver;var DesHor=2;var DesVer=2;var DirHor=true;var DirVer=true;function iniciar(){ajustar();volar(hor/2,ver/2);document.getElementById('abeja').style.visibility="visible";animar();cambiar();reiniciar();}
function ajustar(){if(document.all){hor=document.body.clientWidth;ver=document.body.clientHeight}
else if(document.getElementById&&!document.all){hor=window.innerWidth;ver=window.innerHeight}}
function volar(PosHor,PosVer){document.getElementById('abeja').style.top=parseInt(document.getElementById('abeja').style.top)+PosVer+"px";document.getElementById('abeja').style.left=parseInt(document.getElementById('abeja').style.left)+PosHor+"px";}
function animar(){PosHor=parseInt(document.getElementById('abeja').style.left);PosVer=parseInt(document.getElementById('abeja').style.top);if(DirVer){if((PosVer)>(ver-100)){DirVer=false;volar(0,-DesVer);}else{volar(0,DesVer);}}
else
{if((PosVer)<100){DirVer=true;volar(0,DesVer);}else{volar(0,-DesVer);}}
if(DirHor){if((PosHor)>(hor-100)){DirHor=false;volar(-DesHor,0);}else{volar(DesHor,0);}}
else
{if((PosHor)<100){DirHor=true;volar(DesHor,0);}else{volar(-DesHor,0);}}
setTimeout('animar()',velocidad);}
function cambiar(){DirHor=(Math.floor(Math.random()*2)==0);DirVer=(Math.floor(Math.random()*2)==0);DesHor=Math.floor(Math.random()*CamHorMax);DesVer=Math.floor(Math.random()*CamVerMax);setTimeout('cambiar()',cambio);}
function abejacazada(){document.getElementById('abeja').style.visibility="hidden"}
function reiniciar(){setTimeout("window.onresize=releer",50)}
function releer(){window.location.reload()}
window.onresize=ajustar
// final -->
</script>
NB:
perhatikan teks yg berwarna Merah, anda tinggal menggantinya  sesuai keinginan anda masing-masing. 

4. Save

♂ Good Luck ♀

Semua ini adalah apa yang pernah aku cobain sendiri . . dan aku dapat/mengerti dari teman2 blogger lainnya karena aku hanya seorang blogger pemula yang ingin mengetahui lebih banyak hal lagi . . . . Thank's
Share
Related Post

0 comments:

Archives

Label


ShoutMix chat widget
Guest Book
 

Subscribe Via Email

Enter your email address:

Delivered by FeedBurner

My Blog

Show

Exploration


Show

[Valid Atom 1.0]
Google PageRank Checker Powered by  MyPagerank.Net

Powered by FeedBurner

SEO Stats powered by MyPagerank.Net

Show

Show

Exploration

Welcome To My Blog

I hope you find what you're looking for here . . Thank you for visit to my simple blog . .

Rizky Maulana

This life is a sacrifice and struggle . . and I am just a man who wants to be better than ever . .