bu kod blog basligi ucun cox gozeldir ya web unvaninizi ya da xos gelmisiniz yaza bilersiniz
<br /><br /><h2 id="fly">YAZINI BURA YAZ</h2><br /><br /><br /><br /><br />//Configure message to display. Use "$" for linebreak<br />//By default, set to just grab the text from element with ID="fly"<br />message = document.getElementById("fly").innerHTML; // $ = taking a new line<br />distance = 50; // pixel(s)<br />speed = 200; // milliseconds<br /><br />var txt="",<br /> num=0,<br /> num4=0,<br /> flyofle="",<br /> flyofwi="",<br /> flyofto="",<br /> fly=document.getElementById("fly");<br /><br /><br />function stfly() {<br /> for(i=0;i != message.length;i++) {<br /> if(message.charAt(i) != "$")<br /> txt += "<span style="'position:relative;visibility:hidden;' id='n+i+" />"+message.charAt(i)+"";<br /> else<br /> txt += "<br />";<br /> }<br /> fly.innerHTML = txt;<br /> txt = "";<br /> flyofle = fly.offsetLeft;<br /> flyofwi = fly.offsetWidth;<br /> flyofto = fly.offsetTop;<br /> fly2b();<br />}<br /><br />function fly2b() {<br /> if(num4 != message.length) {<br /> if(message.charAt(num4) != "$") {<br /> var then = document.getElementById("n" + num4);<br /> then.style.left = flyofle - then.offsetLeft + flyofwi / 2;<br /> then.style.top = flyofto - then.offsetTop + distance;<br /> fly3(then.id, parseInt(then.style.left), parseInt(then.style.left) / 5, parseInt(then.style.top), parseInt(then.style.top) / 5);<br /> }<br /> num4++;<br /> setTimeout("fly2b()", speed);<br /> }<br />}<br /><br />function fly3(target,lef2,num2,top2,num3) {<br /> if((Math.floor(top2) != 0 && Math.floor(top2) != -1) || (Math.floor(lef2) != 0 && Math.floor(lef2) != -1)) {<br /> if(lef2 >= 0)<br /> lef2 -= num2;<br /> else<br /> lef2 += num2 * -1;<br /> if(Math.floor(lef2) != -1) {<br /> document.getElementById(target).style.visibility = "visible";<br /> document.getElementById(target).style.left = Math.floor(lef2);<br /> } else {<br /> document.getElementById(target).style.visibility = "visible";<br /> document.getElementById(target).style.left = Math.floor(lef2 + 1);<br /> }<br /> if(lef2 >= 0)<br /> top2 -= num3<br /> else<br /> top2 += num3 * -1;<br /> if(Math.floor(top2) != -1)<br /> document.getElementById(target).style.top = Math.floor(top2);<br /> else<br /> document.getElementById(target).style.top = Math.floor(top2 + 1);<br /> setTimeout("fly3('"+target+"',"+lef2+","+num2+","+top2+","+num3+")",50)<br /> }<br />}<br /><br />stfly()<br /><br />
|