Online Kodlama Dersleri
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Online Kodlama Dersleri

Online Kodlama Dersleri
 
AnasayfaAramaLatest imagesKayıt OlGiriş yapKodonizleme

 

 Yazı efekti

Aşağa gitmek 
YazarMesaj
mythcomeback
Admin
Admin
mythcomeback


Mesaj Sayısı : 862
Yer : im seni
Reputation : 0
Points : 0
Kayıt tarihi : 31/07/08

Kişisel Sayfalar
Metin alanı:

Yazı efekti Empty
MesajKonu: Yazı efekti   Yazı efekti Icon_minitimeC.tesi Eyl. 20, 2008 10:59 am

Kod:
<script type="text/javascript">
// <![CDATA[
var speed=1; // speed of flight, lower is faster
var count=200; // number of frames before animation complete

var airbon, airtxt, airtop, airlef;
var swide=800;
var shigh=600;
var frame=count;
var ax=new Array();
var ay=new Array();
window.onload=function() { if (document.getElementById) {
  var i, y, airme, airli;
  set_width();
  airbon=document.getElementById("airborne");
  if (!document.all) airbon.style.position="relative"; // ie bug fix
  airtxt=airbon.firstChild.nodeValue;
  while (airbon.childNodes.length) airbon.removeChild(airbon.childNodes[0]);
  for (i=0; i<airtxt.length; i++) {
    airli=document.createElement("span");
    airli.setAttribute("id", "airb"+i);
    airli.appendChild(document.createTextNode(airtxt.charAt(i)));
    airbon.appendChild(airli);
  }
  y=getPageTop(airbon);
  for (i=0; i<airtxt.length; i++) ax[i]=getPageLeft(document.getElementById("airb"+i));
  for (i=0; i<airtxt.length; i++) {
    if (Math.random()<0.5) {
      ax[i]=((Math.random()<0.5)?0:swide)-ax[i];
      ay[i]=(Math.floor(Math.random()*shigh))-y;
    }
    else {
      ay[i]=((Math.random()<0.5)?0:shigh)-y;
      ax[i]=(Math.floor(Math.random()*swide))-ax[i];
    }
    airme=document.getElementById("airb"+i);
    airme.style.position="relative";
    airme.style.left=ax[i]+"px";
    airme.style.top=ay[i]+"px";
  }
  fly_me();
}}

function set_width() {
  if (typeof(self.innerWidth)=="number") {
    swide=self.innerWidth;
    shigh=self.innerHeight;
  }
  else if (document.documentElement && document.documentElement.clientWidth) {
    swide=document.documentElement.clientWidth;
    shigh=document.documentElement.clientHeight;
  }
  else if (document.body.clientWidth) {
    swide=document.body.clientWidth;
    shigh=document.body.clientHeight;
  }
}

function getPageLeft(el) {
  var x=0;
  do { x+=el.offsetLeft }
  while ((el=el.offsetParent)!=null) ;
  return x;
}

function getPageTop(el) {
  var y=0;
  do { y+=el.offsetTop }
  while ((el=el.offsetParent)!=null) ;
  return y;
}

function fly_me() {
  var airme;
  for (var i=0; i<airtxt.length; i++) {
  ax[i]-=swide*ax[i]*Math.random()/(frame*(count-1));
  ay[i]-=shigh*ay[i]*Math.random()/(frame*(count-1));
    airme=document.getElementById("airb"+i);
  airme.style.left=Math.round(ax[i])+"px";
  airme.style.top=Math.round(ay[i])+"px";
  }
  if (--frame) setTimeout("fly_me()", speed);
}
// ]]>
</script>
<strong><font color="red"><span id="airborne">YAZIYI BURAYA YAZIN</span></font></strong>
Sayfa başına dön Aşağa gitmek
http://kodogreniyorum.tr.gg
 
Yazı efekti
Sayfa başına dön 
1 sayfadaki 1 sayfası
 Similar topics
-
» Resime Su Efekti

Bu forumun müsaadesi var:Bu forumdaki mesajlara cevap veremezsiniz
Online Kodlama Dersleri :: Teknik Destek :: Forumlarla İlgili-
Buraya geçin: