quinta-feira, 1 de setembro de 2011

Abelha voando na tela



Com este script, uma abelha voará na tela do blog e não vai para até que você clique sobre ela.


Veja o exemplo:






Para colocá-la em seu blog vá em Design > Adicionar Gadget > HTML/Javascript e cole o código:


<h3 align='center'> Bee Controls </ h3>
left: 0px; top: 0px; <div visibility:hidden; id='abeja' z-index:10'> style = posição ': absolute;
<a href='javascript:void(0)' onclick='abejacazada()'> <img src = http://2.bp.blogspot.com/_dsEG33PDaHw/S7TLQwDUqeI/AAAAAAAAAOw/IIw_pAeBOM8/s1600/Abeja.gif " "style =" width: 52px; height: 51px; border: 0; "/> </ a> </ div>

<center>
<Input name = tipo "stop" = "button"
onclick = "abejacazada ()" value = "Stop" />
<Input name = "voar" type = "button"
onclick = "start ()" value = "Flying" />
</ Center>

<script type='text/javascript'>
/ / Juan Rodríguez [Consultor]
<! - Início
var speed = 100;
var mudança = 200;
CamHorMax var = 25;
CamVerMax var = 25;
var hor, ver;
Deshoras var = 2;
Var sótão = 2;
var DirHor = true;
Dirven var = true;

iniciar a função () {
ajustar ();
fly (hor / 2, consulte / 2);
document.getElementById ('bee') style.visibility = "visível".;
animate ();
change ();
reset ();}

ajustar function () {
if (document.all) {
hor = document.body.clientWidth;
ver = document.body.clientHeight}
else if (document.getElementById & &! document.all) {
hor = window.innerWidth;
ver = window.innerHeight}}

fly função (PosHor, Posven) {
+ "Px";
+ "Px";}

função animar () {
PosHor = parseInt (document.getElementById ('bee') Style.left.);
Posven = parseInt (document.getElementById ('bee') Style.top.);

if (Dirven) {
if ((Posven)> (veja-75)) {Dirven = false; fly (0, loft);} else {fly (0, Std);}}
outro
{If ((Posven) <75) {Dirven = true; fly (0, Std);} else {fly (0, loft);}}

if (DirHor) {
if ((PosHor)> (hor-75)) {DirHor = false; mosca (-Deshoras, 0);} {voar (Deshoras, 0);}} else
outro
{If ((PosHor) <75) {DirHor = true; voar (Deshoras, 0);} else {mosca (-Deshoras, 0);}}
setTimeout ("anime () ', a velocidade);}

mudança de função () {
DirHor = (Math.floor (Math.random () * 2) == 0);
Dirven = (Math.floor (Math.random () * 2) == 0);
Deshoras = Math.floor (Math.random () * CamHorMax);
Sótão = Math.floor (Math.random () * CamVerMax);
setTimeout ("change () ', mudança);}

abejacazada function () {document.getElementById ('bee'). style.visibility = "hidden"}

redefinir function () {setTimeout ("window.onresize = reler", 400)}

função de reler () {window.location.reload ()}

window.onresize = ajustar
/ / End ->
</ Script>

Agora em Design> Editar HTML, procure pela tag body e altere por:

<body onload='iniciar()'>



Se você quiser trocar a abelha por outro inseto (borboleta, mosca) basta trocar a linha amarela pela URL da imagem que você desejar.

3 comentários:

leonardo disse...

tem como eu por link na abelha pra quando alguem clikar nela abrir outra pagina...
e eu tbm queria saber se aquele google adsense é confiavel !!!
desde ja obrigado !!!

Bruno disse...

Tem varias tags body, qual sera a correta? Poste uma foto de qual seria a correta! valeu!

Unknown disse...

eu não consigo coloca esse link no meu blog já fiz de tudo....

Artigos Relacionados

Related Posts Plugin for WordPress, Blogger...