Script Caleidoscópio

 

Abra uma mensagem em branco, delete o comando

<body> e cole, em seu lugar, o script abaixo.

As imagens, cujo endereço aparece em azul, devem ter o mesmo tamanho.


 

<BODY bgColor=#000000>&nbsp;

<DIV>&nbsp;</DIV>

<DIV>&nbsp;</DIV>

<DIV style="FONT: 10pt arial" <DIV><BR></DIV><!--

The DIV below holds the images that will be shown in the slide-show.

Width and height should equal the largest Image dimensions.

-->

<DIV id=box

style="LEFT: 0px; WIDTH: 320px; POSITION: absolute; TOP: 0px; HEIGHT: 240px"><!--

This slideshow is much better when all the graphics are the same size.

Also, the graphics for the slide show should be numbered sequentially as shown from pic1 to pic#.

--><IMG id=pic1

style="LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px"

src="jun6.jpg" width="320" height="240"> <IMG id=pic2

style="LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px"

src="jun7.jpg" width="320" height="240"> <IMG id=pic3

style="LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px"

src="jun8.jpg" width="320" height="240"> <IMG id=pic4

style="LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px"

src="jun6.jpg" width="320" height="240">

<DIV align=center><IMG id=pic5

style="LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px"

src="jun7.jpg" width="320" height="240"></DIV> </DIV>

<DIV align=justify>

<DIV

style="FONT-SIZE: 12px; Z-INDEX: 11; FILTER: dropshadow(offx=1, offy=1, color=yellow,enabled=1); LEFT: 10px; WIDTH: 558px; COLOR: red; BOTTOM: 10px; POSITION: absolute; TOP: 50px; HEIGHT: 203px">

<B><BR>

<SCRIPT language=VBScript>

REM Edgar V. Poirier

REM moomoo@nbnet.nb.ca

Dim w, p1, p2, nw, od, numPic, myTimer, tFlag, count, filterDuration, filterType

Set w=document.all

REM Initialize

sub setUp()

REM Enter the total number of images in the next line

numPic=5

REM Enter number of times to cycle images below

count=999

REM Fixed an error in this next section to obtain proper functioning-ThunderBob

REM Transition filter type selection below.

REM Enter 1 for Blend transition

REM Enter 2 for Reveal Transition

filterType=1

if filterType=1 then box.style.filter="BlendTrans(Duration=2)"

if filterType=2 then box.style.filter="RevealTrans(Transition=12, Duration=0)"

REM Transition duration in seconds

filterDuration="2"

box.filters(0).Duration=filterDuration

nw=1

od=0

REM Transition flag - in case it is needed.

tFlag=0

REM Initially display first image

pic1.style.visibility="visible"

REM Do the transition after delay

myTimer=SetTimeOut("doIt",filterDuration*1000)

end sub

REM Do transition

sub doIt()

ClearTimeOut(myTimer)

REM Set for next images

nw=nw+1

REM Make sure image number is valid

if nw>numPic then

nw=1

count=count-1

end if

od=od+1

if od>numPic then od=1

REM Do the transition here

if tFlag=0 and count>0 then

REM Set transition flag to signify transition in progress.

tFlag=1

REM Select Images according to count

REM Previous Image

Set p1=w("pic"&od)

REM Next image

Set p2=w("pic"&nw)

REM Prepare filter

box.filters(0).Apply()

REM Hide previous Image

p1.style.visibility="hidden"

REM Display next Image

p2.style.visibility="visible"

REM Play filter

box.filters(0).Play()

else

if count=0 then

REM Hide the last image

Set p1=w("pic"&od)

box.filters(0).Apply()

p1.style.visibility="hidden"

box.filters(0).Play()

REM Stop everything

exit sub

end if

end if

end sub

REM This subroutine runs when transition has finished.

sub box_OnFilterChange()

REM Transition completed so clear the flag.

tFlag=0

REM Wait a few seconds before next transition

myTimer=SetTimeOut("doIt",filterDuration*1000)

end sub

REM Everything starts here

sub Window_OnLoad()

REM Get users screen resolution

wx=window.screen.width

REM and adjust font size to match.

Res=INT(wx/128)

document.body.style.fontSize = 14+Res

setUp

end sub

</SCRIPT>


 

 

 

design by Angela Maria Pereira Glavam

 

  Copyright © 2002 by Angela Maria P. Glavam ® 

Todos os direitos reservados