home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Buyer 1995 November
/
SHOWCASE.ISO
/
files
/
gallery.dir
/
00001_Script_1
next >
Wrap
Text File
|
1995-06-12
|
16KB
|
437 lines
-- òò -- Lingo coding by David K. Anderson and Terry R. Schussler -- òò --
--òò-- Movie script for Gallery Section --òò--
--=============================================--
-- GALLERY.DIR movie script handlers --
--=============================================--
global demoQTstate, cDemoQT, gSectionPressed, gGalleryList, gFirstGoRound
global gProductList, gReturnFromDemo, gProductSelect, gSectionSelect, cAudioLevel
global gPauseSprite, gPlaySprite, gStopSprite, gRewindSprite, gFforwardSprite, gDemoButtonSprite
global gPictureList, gNumOPics, gCurrentPicture, gFirstProductButton, gLastProductButton
global gPictureSprite, gCurrentSection, gLeftFromQT, gMacIDSprite, gWindowsIdSprite, gLaunchQTButton
global gMyPath, gPTimerSet, gPresentationTime, gPresentationLight, gYellowSet, gRedSet, gLightColor
on startMovie
sound stop 1
sound stop 2
-- Initialize global variables for the sprite channels...
set gFirstProductButton = 3
set gLastProductButton = 10
set gDemoButtonSprite = 11
set gRewindSprite = 12
set gFforwardSprite = 13
set gStopSprite = 14
set gPauseSprite = 15
set gPlaySprite = 16
set gMacIDSprite = 17
set gWindowsIDSprite = 18
set cDemoQT = 31
set gPictureSprite = 34
set gLaunchQTButton = 37
set cAudioLevel = 46 -- channel for volume indicator
set the preLoadEventAbort = TRUE
-- set the preLoadRAM = FALSE
if gReturnFromDemo = TRUE then -- We're coming back from a demo...
set gReturnFromDemo = FALSE
-- ... so reset the previous state for continued browsing. First check where we left from...
if gLeftFromQT = TRUE then
-- Make sure the movie is reset and stopped...
set the movierate of sprite cDemoQT = 0
set the movietime of sprite cDemoQT = 0
put #stop into demoQTstate
else
-- Reset the preview picture...
puppetsprite gLaunchQTButton, 1
puppetsprite gPictureSprite, 1
set the castnum of sprite gLaunchQTButton = the number of cast "PlayQT"
set the castNum of sprite gPictureSprite = the number of cast (string(gCurrentSection) & string(gCurrentPicture))
end if
-- Turn on the Mac and Windows indicator lights if need be...
puppetsprite gMacIDSprite, 1
puppetsprite gWindowsIdSprite, 1
puppetSprite gDemoButtonSprite, 1
if gProductSelect <> #null then
put getProp(gProductList, gProductSelect) into sectionFlags
if getAt(sectionFlags,1) then
set the castNum of sprite gMacIDSprite = the number of cast "macID lit"
else
set the castNum of sprite gMacIDSprite = the number of cast "macID"
end if
if getAt(sectionFlags,2) then
set the castNum of sprite gWindowsIdSprite = the number of cast "windowsID lit"
else
set the castNum of sprite gWindowsIdSprite = the number of cast "windowsID"
end if
if the machineType <> 256 then
if getAt(sectionFlags,3) then
set the castNum of sprite gDemoButtonSprite = the number of cast "GoDemo"
else
set the castNum of sprite gDemoButtonSprite = the number of cast "GoDemo lit"
end if
else
if getAt(sectionFlags,4) then
set the castNum of sprite gDemoButtonSprite = the number of cast "GoDemo"
else
set the castNum of sprite gDemoButtonSprite = the number of cast "GoDemo lit"
end if
end if
-- Reset the control buttons...
puppetsprite gSectionPressed, 1
puppetSprite gDemoButtonSprite, 1
set the castnum of sprite gDemoButtonSprite = the number of cast "GoDemo"
set whichCast = string(gSectionSelect)
set the castnum of sprite gSectionPressed = the number of cast (whichCast && "lit")
end if
end if
if gPTimerSet then
puppetSprite gPresentationLight, 1
set the castnum of sprite gPresentationLight = the number of cast gLightColor
updateStage
end if
end
-- If we are coming to the Gallery from anywhere other than the Demos or the Quit Screen, we'll initialize
-- the global variables and lists with an init handler called from a score script.
on initGallery
global soundlevel
global gProductSelect, gSectionSelect
global gProductPressed, gSectionPressed, gReturnFromDemo
global cDemoQT, demoQTstate
global gGalleryList
global gProductList
set gFirstGoRound = 0
-- if voidP(soundlevel) then put 3 into soundlevel
set gProductSelect = #null
put "" into gSectionSelect
put 0 into gProductPressed
put 0 into gSectionPressed
put #stop into demoQTstate
-- Create a property list which holds the sections and products for those sections...
set gGalleryList = [#presentations:[#jobseek, #longevity, #sancwoods], #sales:[#virtualdrive, #intershop, #elliott, #cmddemo], #courseware:[#nasa, #connect, #lite], #consumer:[#startrek, #helix, #strad, #keroppi], #kiosks:[#telefono, #napa], #graphics:[#dreamlight, #freakshow, #medicine], #custom:[#imps, #mediaband], #macromedia:[#macromedia]]
-- The symbol is the name of the label marker which is branched to.
-- The sublist identifies TRUE (1) or FALSE (0) settings for:
-- [Macintosh, Windows, Macintosh Demo, Windows Demo]
set gProductList = [#jobseek:[1,1,1,1], #longevity:[1,1,0,0], #sancwoods:[1,1,1,1], #virtualdrive:[1,1,0,0], #intershop:[1,1,0,0], #elliott:[1,1,1,1], #cmddemo:[1,1,0,0], #nasa:[1,1,0,0], #connect:[1,1,0,0], #lite:[1,1,0,0], #startrek:[1,1,0,0], #helix:[1,1,0,0], #strad:[1,1,0,0], #keroppi:[1,1,1,1], #telefono:[1,1,1,1], #napa:[1,0,0,0], #dreamlight:[1,1,0,0], #freakshow:[1,1,0,0], #medicine:[1,1,0,0], #imps:[1,1,0,0], #mediaband:[1,1,1,1]]
-- Create a property list which holds the number of preview pictures for each section...
set gPictureList = [#presentations:4, #sales:5, #courseware:4, #consumer:5, #kiosks:3, #graphics:4, #custom:3, #macromedia:1]
end
-- This handler decides which demo to play...
on playGalleryDemo whichOne
set gReturnFromDemo = TRUE
if whichOne = #sancwoods then
if the machineType = 256 then
play movie gMyPath & "DEMOS\SANCWOOD\SANCWOOD.DIR"
else
play movie gMyPath & "DEMOS:SANCWOOD:SANCWOOD.DIR"
end if
exit
end if
if whichOne = #jobseek then
if the machineType = 256 then
play movie gMyPath & "DEMOS\JOBSWIN\JOBSEEK.DIR"
else
play movie gMyPath & "DEMOS:JOBSEEK:JOBSEEK.DIR"
end if
exit
end if
if whichOne = #elliott then
if the machineType = 256 then
play movie gMyPath & "DEMOS\ELLIOTTD\ELLIOTTD.DIR"
else
play movie gMyPath & "DEMOS:ELLIOTTD:ELLIOTTD.DIR"
end if
exit
end if
if whichOne = #keroppi then
if the machineType = 256 then
play movie gMyPath & "DEMOS\KEROPPIW\KP_INTRO.DIR"
else
play movie gMyPath & "DEMOS:KEROPPI:KP_INTRO.DIR"
end if
exit
end if
if whichOne = #telefono then
if the machineType = 256 then
play movie gMyPath & "DEMOS\ELTELDEM\ETDEMO.DIR"
else
play movie gMyPath & "DEMOS:ELTELDEM:ETDEMO.DIR"
end if
exit
end if
if whichOne = #imps then
if the machineType = 256 then
play movie gMyPath & "DEMOS\WOODSTOK\WOODSTOK"
else
play movie gMyPath & "DEMOS:WOODSTOK:WOODSTOK"
end if
exit
end if
if whichOne = #mediaband then
if the machineType = 256 then
play movie gMyPath & "DEMOS\MEDIABAN\HOUSEJAM"
else
play movie gMyPath & "DEMOS:MEDIABAN:HOUSEJAM"
end if
exit
end if
end
--Handlers to play QuickTime movies...
-- PLAY button
on galleryQTplay
put the clickOn into whichSprite
puppetSprite whichSprite, 1
set the castNum of sprite gPlaySprite = the number of cast "playGallery lit"
set the movieRate of sprite cDemoQT = 1
put #play into demoQTstate
set the castNum of sprite gStopSprite = the number of cast "stopGallery"
set the castnum of sprite gPauseSprite = the number of cast "pauseGallery"
updatestage
end
-- PAUSE button
on galleryQTpause
put the clickOn into whichSprite
puppetSprite whichSprite, 1
set the castnum of sprite gPauseSprite = the number of cast "pauseGallery lit"
if demoQTstate = #play then
set the movieRate of sprite cDemoQT = 0
put #pause into demoQTstate
set the castNum of sprite gPlaySprite = the number of cast "playGallery"
updatestage
else
if demoQTstate = #pause then
set the movieRate of sprite cDemoQT = 1
put #play into demoQTstate
set the castNum of sprite gPauseSprite = the number of cast "pauseGallery"
set the castNum of sprite gPlaySprite = the number of cast "playGallery lit"
updatestage
end if
end if
end
-- STOP button
on galleryQTstop
-- go back to the menu
put the clickOn into whichSprite
puppetSprite whichSprite, 1
set the movieTime of sprite cDemoQT = 0
set the movieRate of sprite cDemoQT = 0
returnToSection
set the castNum of sprite gStopSprite = the number of cast "stopGallery"
set the castnum of sprite gPauseSprite = the number of cast "pauseGallery"
set the castNum of sprite gPlaySprite = the number of cast "playGallery"
updatestage
end
-- FAST FORWARD button
on galleryQTfforward
put the clickOn into whichSprite
puppetSprite whichSprite, 1
set the castNum of sprite gFforwardSprite = the number of cast "fforwardGallery lit"
set the movieRate of sprite cDemoQT = 2
repeat while the stillDown
updateStage
end repeat
if the movieTime of sprite cDemoQT = the stopTime of sprite cDemoQT then
-- go back to the menu
set the movieTime of sprite cDemoQT = 0
set the movieRate of sprite cDemoQT = 0
returnToSection
exit
end if
if demoQTstate = #pause OR demoQTstate = #stop then
set the movieRate of sprite cDemoQT = 0
else
set the movieRate of sprite cDemoQT = 1
end if
end
-- FAST REWIND button
on galleryQTrewind
put the clickOn into whichSprite
puppetSprite whichSprite, 1
set the castNum of sprite gRewindSprite = the number of cast "rewindGallery lit"
set the movieRate of sprite cDemoQT = -2
repeat while the stillDown
updateStage
end repeat
if demoQTstate = #pause OR demoQTstate = #stop then
set the movieRate of sprite cDemoQT = 0
else
set the movieRate of sprite cDemoQT = 1
end if
exit
end
on resetVideoButt
set the castNum of sprite gPlaySprite = the number of cast "playGallery"
set the castNum of sprite gStopSprite = the number of cast "stopGallery"
set the castnum of sprite gPauseSprite = the number of cast "pauseGallery"
set the castNum of sprite gFforwardSprite = the number of cast "fforwardGallery"
set the castNum of sprite gRewindSprite = the number of cast "rewindGallery"
end
on gallerySelect whichSection
global gProductPressed, gSectionPressed, gProductSelect, gSectionSelect, gReturnFromDemo
global gCompColor, gGalleryList, cDemoQT, gMacIDSprite, gWindowsIDSprite, gDemoButtonSprite
puppetSound "click"
set gProductSelect = #null
-- if NOT gFirstGoRound then -- Uncomment this section if memory seems to be in short supply.
-- set gFirstGoRound = 1
-- else
-- unLoadCast (the number of cast (string(gCurrentSection & "1"))), ¼
--(the number of cast (string(gCurrentSection & getProp(gPictureList, gCurrentSection))))
-- end if
-- clear the quickTime movie channel
puppetSprite cDemoQT, FALSE
resetVideoButt
put the clickOn into whichSprite
puppetSprite whichSprite, TRUE
put the name of cast the castnum of sprite whichSprite into whichCast
put whichSprite into gSectionPressed
put whichSection into gSectionSelect
set the castnum of sprite whichSprite = the number of cast (whichCast && "lit")
repeat with x = gFirstProductButton to gLastProductButton
if x <> gSectionPressed then puppetSprite x, FALSE
end repeat
set the castnum of sprite gMacIDSprite = the number of cast "macID"
set the castnum of sprite gWindowsIDSprite = the number of cast "windowsID"
set the castNum of sprite gDemoButtonSprite = the number of cast "GoDemo lit"
updateStage
go to frame string(getPropAt(gGalleryList, whichSprite - 2))
put getProp(gPictureList, whichSection) into gNumOPics
set gCurrentSection = whichSection
set gCurrentPicture = 1
end gallerySelect
on returnToSection
global gProductPressed, gSectionPressed, gProductSelect, gSectionSelect
global gGalleryList, cDemoQT
puppetSprite cDemoQT, FALSE
repeat with n = gStopSprite to gPlaySprite
put word 1 of the name of cast (the castNum of sprite n) into offcast
set the castNum of sprite n = the number of cast (offcast)
end repeat
go to frame string(getPropAt(gGalleryList, gSectionPressed-2))
end returnToSection
on galleryProductSelect whichSection
global gProductPressed, gSectionPressed, gProductSelect, gSectionSelect, gReturnFromDemo
global gCompColor, gGalleryList
if whichSection = #null then
set the castNum of sprite gMacIDSprite = the number of cast "macID"
set the castNum of sprite gMacIDSprite = the number of cast "windowsID"
exit
else
if the machinetype <> 256 then puppetSound "click"
puppetSprite gPlaySprite, 1
puppetSprite gLaunchQTButton, 0
set the castNum of sprite gPlaySprite = the number of cast "playGallery lit"
put the clickOn into whichSprite
put the name of cast the castnum of sprite whichSprite into whichCast
put whichSprite into gProductPressed
put whichSection into gProductSelect
go to frame string(whichSection)
put getProp(gProductList, gProductSelect) into sectionFlags
if getAt(sectionFlags,1) then
set the castNum of sprite gMacIDSprite = the number of cast "macID lit"
end if
if getAt(sectionFlags,2) then
set the castNum of sprite gWindowsIdSprite = the number of cast "windowsID lit"
end if
if the machineType <> 256 AND getAt(sectionFlags,3) then
set the castNum of sprite gDemoButtonSprite = the number of cast "GoDemo"
end if
if the machineType = 256 AND getAt(sectionFlags,4) then
set the castNum of sprite gDemoButtonSprite = the number of cast "GoDemo"
end if
updateStage
galleryQTstart
end if
end galleryProductSelect
-- this plays the quicktime movies in the gallery
-- when movie is done, need to return to prior menu
on galleryQTstart
global demoQTstate, cDemoQT, gSoundlevel
-- START button -- upon entry into a product area
set the movieRate of sprite cDemoQT = 1
-- set the volume of sprite cDemoQT = ((gSoundlevel)*32) + 32
set the volume of sprite cDemoQT = 256
put #play into demoQTstate
updateStage
end
on memoryman1
preLoadCast (the number of cast "Gallery blur"), (the number of cast "QuickDraw Box")
end
on mrUnLoader1
put "Before unloading: The freebytes ="&&string(the freeBytes)&& "and the FreeBlock ="&&string(the freeBlock)
unLoadCast (the number of cast "up tooth.pict"), (the number of cast "Gallery blur")
put "After unloading the freebytes ="&&the freeBytes && "and the FreeBlock ="&&the freeBlock
end
on mrUnLoader2
unLoadCast (the number of cast "Binder Snap"), (the number of cast "Startup Loop 2.AIFF")
unLoadCast (the number of cast "PowerUp1"), (the number of cast "PowerUp12")
unLoadCast (the number of cast "GALLERY pic"), (the number of cast "RightHand 3")
end
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
end