• Web sitemizin içeriğine ve tüm hizmetlerimize erişim sağlamak için Web sitemize kayıt olmalı ya da giriş yapmalısınız. Web sitemize üye olmak tamamen ücretsizdir.

Durum çubuğunda hareken eden yazı

  • Konuyu Başlatan Konuyu Başlatan By AreS
  • Başlangıç tarihi Başlangıç tarihi

By AreS

Kayıtlı Üye
Forum Yaşı
11 Yıl 9 Ay
Mesajlar
163
Tepkime puanı
30
Bu kodlar durum cubuğunda hareken eden yazı oluşturmanızı sağlar.

Kod:
<!-- kod başlangıcı -->
<SCRIPT LANGUAGE="JavaScript">

var speed = 100 

var pause = 1000 

var timerID = null
var bannerRunning = false

// create global array
var ar = new Array()

// buraya durum cubuğunda cıkmasını sitediğiniz yazıları yazıyorsunuz
ar[0] = " [email protected]"
ar[1] = " [email protected]"
ar[2] = " www.chati.severiz.biz "
ar[3] = " www.chati.severiz.biz "


var currentMessage = 0

var offset = 0


function stopBanner() {
        // if banner is currently running
        if (bannerRunning)
                // stop the banner
                clearTimeout(timerID)

        // timer is now stopped
        bannerRunning = false
}

// start the banner
function startBanner() {
        // make sure the banner is stopped
        stopBanner()

        // start the banner from the current position
        showBanner()
}

// type-in the current message
function showBanner() {
        // assign current message to variable
        var text = ar[currentMessage]

        // if current message has not finished being displayed
        if (offset < text.length) {
                // if last character of current message is a space
                if (text.charAt(offset) == " ")
                        // skip the current character
                        offset++                        

                // assign the up-to-date to-be-displayed substring
                // second argument of method accepts index of last character plus one
                var partialMessage = text.substring(0, offset + 1) 

                // display partial message in status bar
                window.status = partialMessage

                // increment index of last character to be displayed
                offset++ // IE sometimes has trouble with "++offset"

                // recursive call after specified time
                timerID = setTimeout("showBanner()", speed)

                // banner is running
                bannerRunning = true
        } else {
                // reset offset
                offset = 0

                // increment subscript (index) of current message
                currentMessage++

                // if subscript of current message is out of range
                if (currentMessage == ar.length)
                        // wrap around (start from beginning)
                        currentMessage = 0

                // recursive call after specified time
                timerID = setTimeout("showBanner()", pause)

                // banner is running
                bannerRunning = true
        }
}

// -->

</SCRIPT>
</HEAD>
<BODY onLoad="startBanner()">
</BODY>
</HTML>
<!-- kod bitişi -->
 
Geri
Üst