ini dia scriptnya :
<SCRIPT LANGUAGE="JavaScript">
var speed =5
var pause = 1500
var timerID = null
var bannerRunning = false
var ar = new Array()
ar[0] = "Selamat Datang di http://www.edoshakieb.com"
ar[1] = "Semoga Anda dapat menemukan informasi"
ar[2] = "Silahkan tinggalkan komentarnya donk"
ar[3] = "Keep smile beibeh"
var message = 0
var state = ""
clearState()
function stopBanner() {
if (bannerRunning)
clearTimeout(timerID)
timerRunning = false
}
function startBanner() {
stopBanner()
showBanner()
}
function clearState() {
state = ""
for (var i = 0; i < ar[message].length; ++i) {
state += "0"
}
}
function showBanner() {
if (getString()) {
message++
if (ar.length <= message)
message = 0
clearState()
timerID = setTimeout("showBanner()", pause)
}
//visit http://www.masbugie.com
else {
var str = ""
for (var j = 0; j < state.length; ++j) {
str += (state.charAt(j) == "1") ? ar[message].charAt(j) : " "
}
window.status = str
timerID = setTimeout("showBanner()", speed)
}
}
function getString() {
var full = true
for (var j = 0; j < state.length; ++j) {
if (state.charAt(j) == 0)
full = false
}
if (full) return true
while (1) {
var num = getRandom(ar[message].length)
if (state.charAt(num) == "0")
break
}
state = state.substring(0, num) + "1" + state.substring(num + 1, state.length)
return false
}
function getRandom(max) {
var now = new Date()
var num = now.getTime() * now.getSeconds() * Math.random()
return num % max
}
startBanner()
</SCRIPT>
Note :var speed =5
var pause = 1500
var timerID = null
var bannerRunning = false
var ar = new Array()
ar[0] = "Selamat Datang di http://www.edoshakieb.com"
ar[1] = "Semoga Anda dapat menemukan informasi"
ar[2] = "Silahkan tinggalkan komentarnya donk"
ar[3] = "Keep smile beibeh"
var message = 0
var state = ""
clearState()
function stopBanner() {
if (bannerRunning)
clearTimeout(timerID)
timerRunning = false
}
function startBanner() {
stopBanner()
showBanner()
}
function clearState() {
state = ""
for (var i = 0; i < ar[message].length; ++i) {
state += "0"
}
}
function showBanner() {
if (getString()) {
message++
if (ar.length <= message)
message = 0
clearState()
timerID = setTimeout("showBanner()", pause)
}
//visit http://www.masbugie.com
else {
var str = ""
for (var j = 0; j < state.length; ++j) {
str += (state.charAt(j) == "1") ? ar[message].charAt(j) : " "
}
window.status = str
timerID = setTimeout("showBanner()", speed)
}
}
function getString() {
var full = true
for (var j = 0; j < state.length; ++j) {
if (state.charAt(j) == 0)
full = false
}
if (full) return true
while (1) {
var num = getRandom(ar[message].length)
if (state.charAt(num) == "0")
break
}
state = state.substring(0, num) + "1" + state.substring(num + 1, state.length)
return false
}
function getRandom(max) {
var now = new Date()
var num = now.getTime() * now.getSeconds() * Math.random()
return num % max
}
startBanner()
</SCRIPT>
-Silahkan ubah dan sesuaikan teks yang berwarna merah dengan keinginan Anda.
-Andaikan ingin menambah pesan, silahkan tambahkan dibawahnya
ar[4] = "pesan selanjutnya"
dan seterusnya.
Cara Pasangnya :
Masuk ke menu Rancangan-->Tambah Gadget-->HTML/Javascript copas kode diatas kedalamnya.
Read more: Script Pesan Bergerak di Bar Bawah | Mas Bugie [dot] com http://www.masbugie.com/2011/01/script-pesan-bergerak-di-bar-bawah.html#ixzz2O3G8NpSm
Tidak ada komentar:
Posting Komentar