SCRIPT FAIXA ROLANTE
1) Abra uma nova mensagem e coloque a figura de fundo.
2) Abra o código fonte, e cole o script no local indicado.
COLAR EM:
<BODY background=bk_casal_faixa.jpg bgColor=#fffbf0>COLAR AQUI
Obs: Não insira o script no meio de alguma tag. Preste atenção aos <...> e </...>
3) Colado o script, clique em Visualizar para ver se está funcionando.
4) Algum erro? Recomece do zero.
Tudo certo? Então está pronto. Pode escrever e enviar.
O script está abaixo:
--------------------------------------------------------------------------
<DIV id=imageholder
style="LEFT: 0px; POSITION: absolute; TOP: 0px; Z-INDEX: -1">
<SCRIPT language=VBScript>
<!--
direction="up" ' change the direction of the scroll here: "up" or "left" or "down" or "right"
sizew=800 ' enter the width of the scrolling image here
sizeh=180 ' enter the height of the scrolling image here
nail=16
source=document.body.background
tall=((screen.height\sizeh)+1)*2
wide=(screen.width\sizew)+1
if direction="up" then
max=tall
axis=sizeh
placement=0
reset=0
elseif direction="left" then
max=wide
axis=sizew
placement=0
reset=0
elseif direction="down" then
max=tall
axis=0
placement=-sizeh
reset=-sizeh
elseif direction="right" then
max=wide
axis=0
placement=-sizew
reset=-sizew
end if
document.write "<pre>"
for temp=0 to max
if direction="up" then
document.write "<img id=pics"&temp&" src><br>"
elseif direction="left" then
document.write "<img id=pics"&temp&" src>"
elseif direction="down" then
document.write "<img id=pics"&temp&" src><br>"
elseif direction="right" then
document.write "<img id=pics"&temp&" src>"
end if
document.all("pics"&temp).src=source
next
document.write "</pre>"
document.body.background=" "
window.status="Click na imagem para parar ou reiniciar o rolamento"
sub scroll()
if nail=1 then
exit sub
end if
if placement < axis then
setTimeout "move", 1
else
placement=reset
setTimeout "move", 1
end if
end sub
sub move()
if direction="up" then
imageholder.style.top=-placement
elseif direction="left" then
imageholder.style.left=-placement
elseif direction="down" then
imageholder.style.top=placement
elseif direction="right" then
imageholder.style.left=placement
end if
placement=placement+1
setTimeout "scroll", 1
end sub
sub imageholder_onclick()
if nail=0 then
nail=1
else
nail=0
end if
scroll()
end sub
scroll()
-->
</SCRIPT>
Para corrigir o caimento observado na faixa rolante faça o seguinte: verifique as dimensões da imagem que você está usando para fazer a faixa rolante, clique na aba Origem e procure no código fonte os valores correspondentes às dimensões da figura. Troque os valores encontrados pelas dimensões da figura atual.
Veja o exemplo abaixo:
<SCRIPT language=VBScript><!--
direction="up" ' change the direction of the scroll here: "up" or "left" or "down" or "right"
sizew=800 ' enter the width of the scrolling image here
sizeh=180 ' enter the height of the scrolling image here
Também é possível modificar a direção do rolamento:
direction="up" ' change the direction of the scroll here: "up" or "left" or "down" or "right"
Trocar "up" por "down", por exemplo.
design by Angela Maria Pereira Glavam
Copyright © 2002 by Angela Maria P. Glavam®
Todos os direitos reservados