Sunday, March 03, 2013

Tutorial : Title Bar

  • Layout > Add gadget > HTML/Javascript
  • Copy code di bawah dan terus paste dalam HTML/Javascript
<script type="text/javascript">
//Created by Title bar Maker (http://www.bosiljak.hr/titlemaker)
function tb14_makeArray(n){
this.length = n;
return this.length;
}
tb14_messages = new tb14_makeArray(1);
tb14_messages[0] = "My B E A T";
tb14_rptType = 'infinite';
tb14_rptNbr = 5;
tb14_speed = 34;
tb14_distance = 30;
tb14_delay = 2000;
var tb14_letter = 0;
var tb14_counter=1;
var tb14_currMsg = 0;
var tb14_orgSpaces = tb14_distance;
var tb14_nbrSpaces = tb14_orgSpaces;
var tb14_shootTimer = null;
function tb14_shoottitle(){
var sp=tb14_speed;
var tmp=tb14_messages[tb14_currMsg].substring(0,tb14_letter);
for (var i=0; i<tb14_nbrSpaces; i++)
tmp += "_";
tmp+=tb14_messages[tb14_currMsg].charAt(tb14_letter);
for (var i=0; i < tb14_orgSpaces-tb14_nbrSpaces; i++)
tmp+="_";
tmp += "=o";
document.title=tmp;
tb14_nbrSpaces--;
if (tb14_nbrSpaces == 0){
tb14_letter++;
tb14_orgSpaces -= 1;
tb14_nbrSpaces=tb14_orgSpaces;
if (tb14_letter > tb14_messages[tb14_currMsg].length){
if (tb14_currMsg == tb14_messages.length-1){
if ((tb14_rptType == 'finite') && (tb14_counter==tb14_rptNbr)){
clearTimeout(tb14_shootTimer);
return;
}
tb14_counter++;
tb14_currMsg=0;
}
else{
tb14_currMsg++;
}
tb14_letter=0;
tb14_nbrSpaces = tb14_orgSpaces = tb14_distance;
sp=tb14_delay;
}
}
tb14_shootTimer = setTimeout("tb14_shoottitle()",sp);
}
tb14_shoottitle();
</script>
  • Tukarkan words yang aku dah birukan.

2 comments:

Syed Evan's Punya Blog Lah ^^ said...

kak cam ne nak tukar blog kite nie ke blogskin , tak pandai lah kak nak edit blog :'(

Mas Erma Azni said...

Nanti sy sediakan tutorial okay ? :)