home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Buyer 1995 November
/
SHOWCASE.ISO
/
files
/
intro.dir
/
00001_Script_1
next >
Wrap
Text File
|
1995-06-14
|
8KB
|
219 lines
global attractLoopList, attractLoopDataList, maxBackgrounds, nextBackground, currentBackground, cQuickTime, gTime, lastClickTime, gPresentingTo, gPresentationLight, gPTimerSet, gPresentationTime, gRedSet, gYellowSet, gPresentationOver, lastBackgroundChange
on startmovie
set the preLoadEventAbort = TRUE -- TRS 12/10
--preload sfx for opening 'barn door' effect - JR
preLoadCast 12, 20
memoryManIntro
put the timer into lastClickTime
-- this the channel that the QuickTime movie is in
put 16 into cQuickTime
--
set currentBackground = "AL1"
-- this is the number of backgrounds
put [1,2,3,4,5,6,7,8,9,10,11,12] into attractLoopList
--
-- this is the preload data structure for the backgrounds
-- [2,"a",2,"b",3] -- example
-- [2, <-- this is the number of pairs in the data structure
-- "a",2, <-- this is pair #1 which states that hotspot "a" has a 2 frame duration
-- "b",3] <-- this is pair #2 which states that hotspot "b" has a 3 frame duration
--
-- Assuming that the loadList ([2,"a",2,"b",3]) was for background 5, here is the labels which should
-- be in the Score:
-- AL5
-- AL5a
-- AL5b (at least 2 frames after "AL5a")
--
put [[2,"a",1,"b",1],[3,"a",1,"b",1,"c",1],[2,"a",1,"b",1],[2,"a",1,"b",1],[2,"a",1,"b",1],[2,"a",1,"b",1],¼
[2,"a",1,"b",1],[2,"a",1,"b",1],[2,"a",1,"b",1],[2,"a",1,"b",1],[3,"a",1,"b",1,"c",1],[2,"a",1,"b",1]] into attractLoopDataList
--
-- this is the total number of backgrounds
put count(attractLoopList) into maxBackgrounds
-- let's initialize the next background to be loaded
put newBackground() into nextBackground
if (NOT voidP(gPresentingTo)) OR (gPresentingTo <> EMPTY) then
put gPresentingTo into field "CompanyDisplay"
else
put " " into field "CompanyDisplay"
put "30" into field "Timer Amount"
end if
end startmovie
on idle
--waitFor .1
-- updateStage -- OUT 12/9
end idle
on waitFor seconds
put the timer into now
repeat while the timer < now + (seconds * 60)
if the mouseDown then exit
end repeat
end waitFor
-- this handler selects a random non-redundant background to show
on newBackground
global lastChoice
put count(attractLoopList) into numChoices
-- is the list empty?
if numChoices = 0 then
-- this line should be the same as in the "startMovie" handler above
put [1,2,3,4,5,6,7,8,9,10,11,12] into attractLoopList
put maxBackgrounds into numChoices
end if
-- is this a brand new list?
if numChoices = maxBackgrounds then
put random(maxBackgrounds) into theOffset
put getAt(attractLoopList, theOffset) into theChoice
repeat while theChoice = lastChoice
put random(maxBackgrounds) into theOffset
put getAt(attractLoopList, theOffset) into theChoice
end repeat
else
-- is this the last item in the list?
if numChoices = 1 then
put getAt(attractLoopList,1) into lastChoice
put lastChoice into theChoice
put 1 into theOffset
else
-- something other than the above
put random(numChoices) into theOffset
put getAt(attractLoopList, theOffset) into theChoice
end if
end if
-- remove the selected item from the list so it won't be there the next time
deleteAt(attractLoopList, theOffset)
-- put theChoice, theOffset ---
-- return the selected background number
return theChoice
end newBackground
on preloadBackground whichOne
-- put the timer into now -- TRS
-- grab the list of data to preload
put getAt(attractLoopDataList, whichOne) into loadList
-- preload the background frame first
put "AL"&string(whichOne) into theFrame
-- put theFrame ---
preload theFrame, theFrame
-- now let's preload the hotspot graphics
put getAt(loadList,1) into numScenes
repeat with x = 1 to numScenes
put "AL"&string(whichOne)&getAt(loadList,(x*2)) into theFrame
put label(theFrame) into firstFrame
-- put firstFrame + getAt(loadList,(x*2)+1) - 1 into lastFrame -- TRS
-- put firstFrame, lastFrame ---
-- preload firstFrame, lastFrame -- TRS
preload firstFrame, firstFrame
end repeat
-- repeat while the timer < now + (60 * 1) -- TRS
-- -- if the mouseDown then exit
-- end repeat -- TRS
-- set the movieRate of sprite cQuickTime = 1
end preloadBackground
on changeBackground
put "AL"&string(nextBackground) into theFrame
put theFrame into currentBackground
-- puppetsOff -- TRS
puppetSprite 3, FALSE
puppetSprite 4, FALSE
puppetSprite 5, FALSE
puppetSprite 6, FALSE
puppetSprite 7, FALSE
go to theFrame
-- To make sure all the channels with elements are puppeted
puppetSprite 3, TRUE
puppetSprite 4, TRUE
puppetSprite 5, TRUE
puppetSprite 6, TRUE
puppetSprite 7, TRUE
put newBackground() into nextBackground
put the ticks into lastBackgroundChange
end changeBackground
on changeHotspot whichOne
-- Capture the sprite info before anything can change the value
-- put the mouseCast into whichCast
put the clickOn into whichSprite
put the castNum of sprite whichSprite into whichCast
put (the name of cast whichCast) into myName
put (currentBackground & whichOne) into theSpot
-- put theSpot
put the last word of myName into myNum
put not value(myNum) into word (the number of words in myName) of myName
-- puppetSprite the clickOn, FALSE
-- if myName = "1" then the QuickTime movie was clicked on, ignore it
-- if myName <> "1" then
set the castNum of sprite whichSprite = cast myName
put the ticks into lastBackgroundChange
go to theSpot
-- end if
-- puppetSprite the clickOn, TRUE
end changeHotspot
on puppetsOff
repeat with x = 3 to 7
puppetSprite x, FALSE
end repeat
end puppetsOff
on delayfor n
starttimer
repeat while the timer < n
end repeat
end
on checkey
global delaytime
if the key = "0" then set delaytime = 9
if the key = "1" then set delaytime = 8
if the key = "2" then set delaytime = 7
if the key = "3" then set delaytime = 6
if the key = "4" then set delaytime = 5
if the key = "5" then set delaytime = 4
if the key = "6" then set delaytime = 3
if the key = "7" then set delaytime = 2
if the key = "8" then set delaytime = 1
if the key = "9" then set delaytime = 0
-- if the key = "m" then go to movie "interface mockup"
end checkey
on mainButtonSelect whichOne
global whichSprite
put the clickOn into whichSprite
puppetSprite whichSprite, TRUE
set the castnum of sprite whichSprite = ¼
the number of cast (the name of cast (the castnum of sprite whichSprite) && "lit")
updatestage
repeat while the stillDown
end repeat
puppetSprite whichSprite, FALSE
put [#macromedia:"vision",#tools:"tools",#services:"support",#gallery:"gallery"] into thePlaces
put getProp(thePlaces,whichOne) into destination
go to movie destination
end
on memoryManIntro
preLoadCast (the number of cast "Volume Down"), (the number of cast "Quit")
preLoadCast (the number of cast "Volume Down lit"), (the number of cast "Quit lit")
preLoadCast (the number of cast "sound level 0"), (the number of cast "sound level 6")
preLoadCast (the number of cast "main macromedia"), (the number of cast "basic panel")
preLoadCast (the number of cast "basic panel grey")
end
on randomSting
put random(8) into randomNumy
if randomNumy = "1" then puppetsound "MMsting1.aif"
if randomNumy = "2" then puppetsound "MMsting2.aif"
if randomNumy = "3" then puppetsound "MMsting3.aif"
if randomNumy = "4" then puppetsound "MMsting4.aif"
if randomNumy = "5" then puppetsound "MMsting5.aif"
if randomNumy = "6" then puppetsound "MMsting6.aif"
if randomNumy = "7" then puppetsound "MMsting7.aif"
if randomNumy = "8" then puppetsound "MMsting8.aif"
end randomSting