Flashlike zoom-fade-scroller

T

TANDEX

I have a few questions about script: Flashlike zoom-fade-scroller

I have united this 2 parts in one code to insert JavaScript code into html
page:

<script>

// scroller message
var message="WELCOME TO MY WEBSITE, Licence Free Portable Radios, Thank you
for visiting!"

// fonts. Add as many fonts as you like.
var messagefont=new Array("Arial Black","Verdana","Impact","Comic Sans MS")

// fontcolors. Add as many fontcolors as you like.
var messagecolor=new Array("red","olive","888888","purple")

// horizontal and vertical position of scroller (pixels)
var positionleft=200
var positiontop=10


var timer
var marginright=0
var i_fadestrength=5
var i_message=0
var i_messagecolor=0
var i_messagefont=0
var step=1
var maxfontsize=220
var fontsizefactor=maxfontsize/100
var content
var textboxwidth=0
var bodywidth=0
message=message.split(" ")


function setmessage() {
if (i_message>=message.length) {i_message=0}
if (i_messagecolor>=messagecolor.length) {i_messagecolor=0}
if (i_messagefont>=messagefont.length) {i_messagefont=0}
content="<nobr><font color="+messagecolor[i_messagecolor]+"
face="+messagefont[i_messagefont]+">"+message[i_message]+"</font><nobr>"
textbox.innerHTML=content
i_message++
i_messagecolor++
i_messagefont++
timer=setTimeout("resizemessage()",500)
}

function resizemessage() {
if (i_fadestrength<120) {
textbox.filters.alpha.opacity=Math.floor(100-i_fadestrength)
document.all.textbox.style.fontSize=i_fadestrength*fontsizefactor
document.all.textbox.style.posLeft=positionleft-(Math.floor(i_fadestrength/1.1*fontsizefactor)) document.all.textbox.style.posTop=positiontop document.all.textbox.style.width=bodywidth-document.all.textbox.style.posLeft-5 document.all.textbox.style.overflowX="hidden" document.all.textbox.style.visibility="visible" step+=1.5 i_fadestrength+=step timer=setTimeout("resizemessage()",50)}else { clearTimeout(timer) i_fadestrength=0; step=1; setmessage() }}if (document.all) { document.write("<DIV id='textbox'style='position:absolute;font-family:Verdana;filter:alpha(opacity=0);'></DIV>") document.write("<DIV style='position:relative;'>")}if (document.all) { bodywidth=document.body.clientWidth-5 setmessage()}</script>I have 3 questions:- how to adjust code to block automatic repeating the messages(show onlyonce)?- It shows the text as separate words, word by word. Is there a way to showtext as whole sentences, not by words?- what value is responsible for to change font size?Thank you!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top