home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Buyer 1995 November
/
SHOWCASE.ISO
/
files
/
vision.dir
/
00191_Script_191
< prev
next >
Wrap
Text File
|
1995-06-14
|
6KB
|
165 lines
global cAudioLevel, gLastSprite, gPTimerSet, gPresentationTime, gRedSet, gPresentationLight, gYellowSet, gLightColor
global gSoundlevel, gTextBallLocV
--JR's globals
global gForgive
-- Dave's new globals
global gOrigTextLocV, gConstrSprite1, gBallSprite1, gTextSprite1, gHiliteColor, gWindowHeight
global gIndexSpriteH, gIndexSpriteV, gTextSprite2, gConstrSpriteH, gBallSprite2V, gBallSprite2H
global gWindowHeight2, gWindowWidth2, gConstrSprite2V, gConstrSprite2H
global gOrigTextLocH, gOrigIndexLocV, gOrigIndexLocH
on startmovie
set the floatPrecision = 3
setGlobalConstants
-- init JR's globals
-- set gForgive = 20
-- set gTextBallLocV = 91
set gPresentationLight = 48
set cAudioLevel = 46
puppetSprite cAudioLevel, TRUE
set the castnum of sprite cAudioLevel = the number of cast ("sound level" && gSoundlevel)
preLoadCast 231, 237
set gLastSprite = 0
if gPTimerSet then
puppetSprite gPresentationLight, 1
set the castnum of sprite gPresentationLight = the number of cast gLightColor
end if
updatestage
end
on setGlobalConstants
set gHiliteColor = 113
set gWindowHeight = 272
set gTextSprite1 = 4
set gConstrSprite1 = 16
set gBallSprite1 = 19
set gIndexSpriteH = 8
set gIndexSpriteV = 9
set gTextSprite2 = 6
set gConstrSprite2V = 16
set gConstrSprite2H = 21
set gBallSprite2V = 19
set gBallSprite2H = 24
set gWindowHeight2 = 200
set gWindowWidth2 = 312
end
-- Scroll handler for first set of annuals.
-- Arguments: whichSprite is the arrow being clicked; whichWay is direction: -1 for up, 1 for down.
on scrollArrow whichSprite, whichWay
puppetSprite whichSprite, 1
set the castnum of sprite whichSprite = ¼
the number of cast (the name of cast(the castnum of sprite whichSprite) && "lit")
set constrainOffset = the top of sprite gConstrSprite1
set textSpriteHeight = the height of sprite gTextSprite1
set travelLength = textSpriteHeight - gWindowHeight
set the constraint of sprite gBallSprite1 = gConstrSprite1
-- set the forecolor of sprite gBallSprite1 = gHiliteColor
repeat while the stilldown
set the locV of sprite gBallSprite1 = the locV of sprite gBallSprite1 + whichWay
set ballDistance = the locV of sprite gBallSprite1 - constrainOffset
set ballPer = ballDistance/float(the height of sprite gConstrSprite1)
set the locV of sprite gTextSprite1 = gOrigTextLocV - (ballPer * travelLength)
updatestage
end repeat
set the castnum of sprite whichSprite = ¼
the number of cast (word 1 of the name of cast(the castnum of sprite whichSprite))
-- set the forecolor of sprite gBallSprite1 = 255
updatestage
puppetSprite whichSprite, 0
end
on scrollArrow2V whichSprite, whichWay
puppetSprite whichSprite, 1
set the castnum of sprite whichSprite = ¼
the number of cast (the name of cast(the castnum of sprite whichSprite) && "lit")
set constrainOffset = the top of sprite gConstrSprite2V
set textSpriteHeight = the height of sprite gTextSprite2
set travelLength = textSpriteHeight - gWindowHeight2
set the constraint of sprite gBallSprite2V = gConstrSprite2V
repeat while the stilldown
set the locV of sprite gBallSprite2V = the locV of sprite gBallSprite2V + whichWay
set ballDistance = the locV of sprite gBallSprite2V - constrainOffset
set ballPer = ballDistance/float(the height of sprite gConstrSprite2V)
set the locV of sprite gTextSprite2 = gOrigTextLocV - (ballPer * travelLength)
set the locV of sprite gIndexSpriteV = gOrigIndexLocV - (ballPer * travelLength)
updatestage
end repeat
set the castnum of sprite whichSprite = ¼
the number of cast (word 1 of the name of cast(the castnum of sprite whichSprite))
updatestage
puppetSprite whichSprite, 0
end
on scrollArrow2H whichSprite, whichWay
puppetSprite whichSprite, 1
set the castnum of sprite whichSprite = ¼
the number of cast (the name of cast(the castnum of sprite whichSprite) && "lit")
set constrainOffset = the left of sprite gConstrSprite2H
set textSpriteWidth = the width of sprite gTextSprite2
set travelLength = textSpriteWidth - gWindowWidth2
set the constraint of sprite gBallSprite2H = gConstrSprite2H
repeat while the stilldown
set the locH of sprite gBallSprite2H = the locH of sprite gBallSprite2H + whichWay
set ballDistance = the locH of sprite gBallSprite2H - constrainOffset
set ballPer = ballDistance/float(the width of sprite gConstrSprite2H)
set the locH of sprite gTextSprite2 = gOrigTextLocH - (ballPer * travelLength)
set the locH of sprite gIndexSpriteH = gOrigIndexLocH - (ballPer * travelLength)
updatestage
end repeat
set the castnum of sprite whichSprite = ¼
the number of cast (word 1 of the name of cast(the castnum of sprite whichSprite))
updatestage
puppetSprite whichSprite, 0
end
-- For presentation timer.
on enterFrame
if gPTimerSet then
if the timer > (gPresentationTime * 3600) AND not gRedSet then
set gLightColor = "Red timer light lit"
set the castnum of sprite gPresentationLight = the number of cast gLightColor
set gRedSet = TRUE
exit
end if
if the timer > ((gPresentationTime * 3600) - 7200) AND not gYellowSet then
set gLightColor = "Yellow timer light lit"
set the castnum of sprite gPresentationLight = the number of cast gLightColor
set gYellowSet = TRUE
end if
end if
if the freebytes < 300000 then unload
end