home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Today - The Disc! 9
/
cdrt09.iso
/
pc
/
putnam
/
pnmba
/
shared.dir
/
00772_Script_772
< prev
Wrap
Text File
|
1995-01-13
|
30KB
|
913 lines
-- "A" Main 8/26
on initBA
global gHardDrivePath,gAMoviePath,gBMediaPath,gCMediaPath,gDMediaPath,gEMediaPath
global gHDMovieList,gMovieList,gThisLoc,gLastLoc
global gDovePuppetNum,gWandFlag,gWandNum,gWandSnd,gSystemCursor,gCPUSpeed
global gLoudness,gClickSnd,gMagicSnd,gFoundLetters,gGroveLocNum
global gReturnMarker,gRegionLine,gMouseX,gMouseY,gHideOffset
global gThisTaskNum,gHintLevel,gTaskClickOns,gTCOnLimit,gTaskTicks,gTaskTicksLimit
global gDoveRestNum,gDoveFinal,gDoveVStart,gDoveHStart,gAnimPause
global gStartTicks,gAudioStart,gShortCutsFlag
global gMsgeFlag,gStartLoad,gFreeMemKb
global gDoveBubbleChannel -- used for separate bubble animation channel.
global gSaidThat -- used in CM
wandToggle 0
cursor 4
if the machineType <> 256 then
-- set volName = "sampler:"
set volName = "@:"
set gAMoviePath = the pathName
else
-- set volName = "sampler:"
set volName = "@:"
set gAMoviePath = volName
end if
-- set gBMediaPath = volName & "BA:b_Media:"
-- set gCMediaPath = volName & "BA:c_Media:"
-- set gDMediaPath = volName & "BA:d_Media:"
-- set gEMediaPath = volName & "BA:e_Media:"
set gBMediaPath = "@:" & "b_Media:"
set gCMediaPath = the pathName & "c_Media:"
set gDMediaPath = "@:" & "d_Media:"
set gEMediaPath = the pathName & "e_Media:"
set gThisLoc = empty
set gLastLoc = empty
set gMovieList = "¼
L01_CW,L02_NY,L03_NK,L04_NB,L05_NS,L06_CM,L07_FB,L08_AM,L09_MT,¼
L10_CP,L11_GE,L12_GA,L13_GB,L14_GC,L15_TC,L16_AY,L17_AK,L18_WR,L19_HR,¼
L20_RB,Chap1,Chap2B,Chap4,Chap5B,Chap8"
set gRegionLine = empty
set gReturnMarker = empty
set gStartTicks = the ticks
set gAudioStart = 0
set gFoundLetters = string(random(9))
set gDovePuppetNum = 23
set gWandSnd = "Ding"
set gClickSnd = "WoodClick"
set gMagicSnd = "Magic"
set gShortCutsFlag = 0
set gLoudness = the soundLevel
set gSystemCursor = 0
set gWandNum = 0
set gGroveLocNum = empty
set gDoveVStart = 1000
set gDoveHStart = 1000
set gDoveRestNum = empty
set gDoveFinal = empty
set gAnimPause = 3
set gTaskClickOns = 0
set gTaskTicks = 0
set gTCOnLimit = 6 -- set here only 6 clicks
set gTaskTicksLimit = 7200 -- set here only 2 min
set gHintLevel = 0
set gHideOffset = 10000
set gMouseX = 0
set gMouseY = 0
set gThisTaskNum = 0
initArrays
set the switchColorDepth = 1
set gDoveBubbleChannel = 21 -- change this in init scripts or initlocs.
set gSaidThat = 0 -- used to track entering sentence in CM
--Debug remove below here
if the shiftDown then
set gMsgeFlag = 1
puppetSprite 21, 1
else
set gMsgeFlag = 0
end if
--set the keydownScript = "checkKey"
set gStartLoad = the ticks
set gFreeMemKb = the freeBytes/1024
checkSystem
-- end initBA
on checkSystem
global gCPUSpeed
set qtPresent = quickTimePresent()
set bitDepth = the colorDepth
--set speedRating = checkCPUSpeed()
--if speedRating > 35 then
set machineString = string(the machineType)
set upperSlowList = "19,21,22,23,25,27,30,31,32,35,37,42,43,46,48,53,54,69,82"
if (the machineType < 18 and the machineType <> 11) or upperSlowList contains machineString then
set gCPUSpeed = #Slow
else
set gCPUSpeed = #Fast
end if
if qtPresent = 0 then
cursor -1
goMName "QTWarning"
else if bitDepth <> 8 then
-- cursor -1
-- goMName "colorWarning"
end if
putMsge "checkSystem : qt,bits,CPU,speed" && qtPresent && bitDepth && the machineType && gCPUSpeed
on checkCPUSpeed
startTimer
repeat with i = 1 to 100
set x = 15.1/16.1
end repeat
return(the timer)
putMsge "checkCPUSpeed :" && the timer
--end checkCPUSpeed
on initLoc locName
global gThisLoc,gLastLoc,gWandFlag,gBAChannel,gBAHeadChannel,gSystemCursor
global gTaskClickOns,gTaskTicks,gHintLevel,gPuppetClickOnList
global gDoveRestNum,gDoveBubbleChannel,gJumpMarker,gReturnMarker
if gThisLoc <> locName then -- in case this is redundantly called within movie
cursor 4
updateStage -- to help finish dissolve ?
set the centerStage = 1
set gDoveBubbleChannel = 21
set gDoveRestNum = empty
set gSystemCursor = 0
set gWandFlag = 0
set gLastLoc = gThisLoc
set gThisLoc = locName
set gHintLevel = 0
set gPuppetClickOnList = empty
set gBAChannel = 0
set gBAHeadChannel = 0
set gReturnMarker = empty
set gJumpMarker = empty
set gTaskClickOns = 0
set gTaskTicks = the ticks
set initCmdName = "init" & locName
do string(initCmdName)
end if
-- end initLoc
on preloadCastLoop cName1,cName2,doveSide
global gPreloadBusy
set gPreloadBusy = 1
set cNum1 = the number of cast cName1
set cNum2 = the number of cast cName2
putMsge "PreloadCastLoop" && cNum1 && cNUm2
repeat with i = cNum1 to cNum2
preLoadCast i
--if the mouseDown then checkRegions
--set cursor = cursor + 1
end repeat
if stringP(doveSide) then
if doveSide = "R" then
preloadCast H61,H66
else
preloadCast H51,H56
end if
end if
preloadCast H71,H82 -- wand,sounds,hilites
showLoadInfo -- debug
set gPreloadBusy = 0
--end preloadCast
on sharedIdle
global gWandFlag
if gWandFlag = 1 then wandMove --else updateStage?
-- end sharedIdle
on wandToggle stateFlag
global gWandFlag,gHideOffset,gCPUSpeed,gSystemCursor
set gWandFlag = stateFlag
if gWandFlag = 0 then
set the locV of sprite 24 to gHideOffset
cursor -1
updateStage
else
if gCPUSpeed = #Fast and gSystemCursor = 0 then
if gWandFlag = 1 then
cursor 200
puppetSprite 24,1
wandMove
else -- must be - 1
cursor 200
set the locV of sprite 24 to gHideOffset
updateStage
end if -- check for 1
else
if gWandFlag = 1 then
cursor 211
wandMove
else
cursor 200
end if
end if
end if -- check for 0
--end wandToggle
on wandMove
-- EFB 5/18;Makes magic wand act as virtual mouse
global gWandFlag,gWandNum,gCPUSpeed,gSystemCursor
if gCPUSpeed = #Fast and gSystemCursor = 0 then
set the locV of sprite 24 to the mouseV
set the locH of sprite 24 to the mouseH
set gWandNum = not gWandNum
if gWandNum = 0 then
set the castNum of sprite 24 to¼
the number of cast "wand.1"
else
set the castNum of sprite 24 to¼
the number of cast "wand.0"
end if
else
set gWandNum = not gWandNum
if gWandNum = 0 then
cursor 757
else
cursor 759
end if
end if
updateStage
--end wandMove
on wandAnim cType
global gThisLoc,gWandSnd,gCPUSpeed,gSystemCursor
puppetSound gWandSnd
updateStage
if gCPUSpeed = #Fast and gSystemCursor = 0 then
repeat with i = 2 to 4
set the castNum of sprite 24 to (the number of cast ("wand." & i))
updateStage
end repeat
else
repeat with i = 1 to 4
cursor (756 + i)
updateStage
delay 15
end repeat
cursor 200
updateStage
end if
repeat while soundBusy(1)
end repeat
puppetSound 0
-- end wandAnim
on startAudio sndName,folderCode
--EFB 6/1
global gbMediaPath,gCMediaPath,gDMediaPath,gMovieList
if stringP(sndName) then -- If sndName is passed, plays external AIF file
--putMsge "startAudio" && sndName && folderCode
if char 1 of folderCode = "L" then -- Location AIF file path
delete char 1 of folderCode
set movieName = item value(folderCode) of gMovieList
set sndPath = (gBMediaPath & movieName & ":" & sndName & ".AIF")
else if char 1 of folderCode = "D" then -- ReadBook AIF file path
delete char 1 of folderCode
set movieName = item value(folderCode) of gMovieList
set sndPath = (gDMediaPath & movieName & ":" & sndName & ".AIF")
else if char 1 of folderCode = "C" then -- Chapter AIF File path
delete char 1 of folderCode
set folderName = "CHAP" & folderCode
set sndPath = (gCMediaPath & folderName & ":" & sndName & ".AIF")
else --need to put c's in front of all names -- Chapter AIF File path
set folderName = "CHAP" & folderCode
set sndPath = (gCMediaPath & folderName & ":" & sndName & ".AIF")
end if
set freeKB = the freeBytes /1024
if freeKB < 50 then
--beep 2
putMsge ("Need to unload:startAudio/freeKB" && sndPath && freeKB)
set startNum = the number of cast "PL/Unload"
repeat with i = startNum to 512
unloadCast i
set freeKB = the freeBytes /1024
if freeKB > 50 then exit repeat
end repeat
putMsge ("startAudio/freeKB/i" && sndPath && freeKB && i - startNum)
else
putMsge ("startAudio/freeKB" && sndPath && freeKB)
end if
sound playFile 1, sndPath
put sndPath
end if
startTimer
-- end startAudio
on checkAudio continueTicks,syncWord
if continueTicks = "End" then
if the soundBusy of 1 then
go the frame
end if
else
if (the timer < continueTicks) then
go the frame
set timer = 0
end if
end if
-- end checkAudio
on checkAudioLoop endLoopTime,nextFrame
if the timer > endLoopTime then
if stringP(nextFrame) then
goMName nextMarkerName
else if integerP(nextFrame) then
go nextFrame
else
go marker(1)
end if
end if
--end checkAudioLoop
on playAmbient sndName,folderCode
if not soundBusy(1) then startAudio sndName,folderCode
--end playAmbient
on fadeOut
global gFadeOut,gLoudNess
set gFadeOut = 0
set gLoudness = the soundLevel
repeat with i = 1 to gLoudness
--putMsge "Fading Level/Timer" && the soundLevel && the timer
set the soundLevel to (gLoudness - i)
startTimer
repeat while the timer < 5
end repeat
end repeat
sound stop 1
set the soundLevel to gLoudness
--end macro
on stopAudio
sound stop 1
puppetSound 0
--end stopAudio
on audioFinish
set returnString = "done"
repeat while (the soundBusy of 1)
idle
if the mouseDown then
set returnString = "mouseDown"
exit
end if
end repeat
doveAway
return returnString
--end audioFinish
on puppetRange p1,p2,onFlag
repeat with i = p1 to p2
setLocPuppet i,onFlag
end repeat
--end puppetRange
on setImmediateRange sNum1,sNum2
repeat with i = sNum1 to sNum2
set the immediate of sprite i to TRUE
end repeat
--end setImmediateRange
on initArrays
global gLeftArray,gTopArray,gRightArray,gBottomArray
global gTypeArray,gOptionArray,gFlagArray,gCounterArray,gNameArray
set gLeftArray = arrayMaker2(mNew,20)
set gTopArray = arrayMaker2(mNew,20)
set gRightArray = arrayMaker2(mNew,20)
set gBottomArray = arrayMaker2(mNew,20)
set gTypeArray = arrayMaker2(mNew,20)
set gOptionArray = arrayMaker2(mNew,20)
set gFlagArray = arrayMaker2(mNew,20)
set gCounterArray = arrayMaker2(mNew,20)
set gNameArray = arrayMaker2(mNew,20)
--end initArrays
on initRegions regionNum
global gLeftArray,gTopArray,gRightArray,gBottomArray
global gTypeArray,gOptionArray,gFlagArray,gCounterArray,gNameArray,gRegionTotal,gMidLine
set currentRegions = the text of cast ("regionNums." & regionNum)
delete line 1 to 2 of currentRegions
set gRegionTotal = the number of lines in currentRegions
set gMidLine = gRegionTotal / 2
repeat with i = 1 to gRegionTotal
gLeftArray(mPut,i,integer(item 1 of line i of currentRegions))
gTopArray(mPut,i,integer(item 2 of line i of currentRegions))
gRightArray(mPut,i,integer(item 3 of line i of currentRegions))
gBottomArray(mPut,i,integer(item 4 of line i of currentRegions))
gTypeArray(mPut,i,integer(item 5 of line i of currentRegions))
gOptionArray(mPut,i,integer(item 6 of line i of currentRegions))
gFlagArray(mPut,i,integer(item 7 of line i of currentRegions))
gCounterArray(mPut,i,integer(item 8 of line i of currentRegions))
gNameArray(mPut,i,string(item 9 of line i of currentRegions))
end repeat
-- end initRegions
on checkRegions
-- EFB 5/18
global gLeftArray,gTopArray,gRightArray,gBottomArray
global gTypeArray,gOptionArray,gFlagArray,gCounterArray,gNameArray
global gRegionLine,gThisLoc,gThisTaskNum,gThisRegion,gRegionTotal,gMidLine
global gWandFlag,gMouseY,gMouseX,gDoveRestNum,gDovePuppetNum,gClickSnd
--putMsge "checkRegions"
set gMouseY = the mouseV
set gMouseX = the mouseH
if gDoveRestNum <> empty then
puppetSound gClickSnd
putMsge "checkRegions called with dove still open"
doveAway -- in case dove was not put away properly
puppetSound 0
end if
if gWandFlag = 1 then
if gMouseX > gLeftArray(mGet,gMidLine) then
set startLine = gMidLine
set endLine = gRegionTotal
else
set startLine = 1
set endLine = gMidLine - 1
end if
repeat with i = startLine to endLine
if gMouseX > gLeftArray(mGet,i) then
if gMouseY > gTopArray(mGet,i) then
if gMouseX < gRightArray(mGet,i) then
if gMouseY < gBottomArray(mGet,i) then
if gFlagArray(mGet,i) = 1 then
set cName = gNameArray(mGet,i)
set cType = gTypeArray(mGet,i)
set cOption = gOptionArray(mGet,i)
set gRegionLine = i
putMsge "CheckRegions complete" && i && (the lastClick)
clickOn cName,cType,cOption
end if
exit repeat
end if
end if
end if
end if
idle --To update wand
end repeat
idle -- To update wand
end if
-- end checkRegions
on clickOn cName,cType,cOption,cLineNum
global gTaskClickOns,gThisTaskNum,gRegionLine,gDoveRestNum,gClickSnd,gWandFlag
if gDoveRestNum <> empty then
puppetSound gClickSnd
--putMsge "clickOn called with dove still open"
doveAway -- in case dove was not put away properly
puppetSound 0
else
if gWandFlag = 1 and the lastClick < 90 then
wandAnim cType
wandToggle 0
--putMsge "ClickOn the lastClick:" && the lastClick
if cType = 0 then
if cOption = 0 then set cOption = 1 -- should lose this
goMName (cName & "." & cOption)
else if cType = 1 then
stopLoop
goMName (cName & ".1")
else if cType = 2 then
if integerP(cLineNum) then set gRegionLine = cLineNum
doSeqAnim cName,cOption
else if cType = 3 then
if integerP(cLineNum) then set gRegionLine = cLineNum
doRandomAnim cName,cOption
else if cType = 4 then
doTaskAnim cName,cOption
else if cType = 6 then
BAHint -- local movie handler
else if cType = 7 then
clickOnLocal cName,cOption
end if
set gTaskClickOns = gTaskClickOns + 1
end if
end if
-- end clickOn
on doSeqAnim cName,cOption
global gCounterArray,gRegionLine
set nextNum = gCounterArray(mGet,gRegionLine) + 1
if nextNum > cOption then set nextNum = cOption
set nextNum = integer(nextNum)
gCounterArray(mPut,gRegionLine,nextNum)
goMName (cName & "." & nextNum)
--end goAnim
on doRandomAnim cName,cOption
global gCounterArray,gRegionLine
set nextNum = gCounterArray(mGet,gRegionLine)
putMsge "doRandomAnim nextNum vs coption" && nextNum && cOption
if nextNum = 0 then
set nextNum = random(cOption)
else
if nextNum = cOption then
set nextNum = 1 -- Loops back to 1
else
set nextNum = nextNum + 1
end if
end if
gCounterArray(mPut,gRegionLine,nextNum)
goMName (cName & "." & nextNum)
-- end goAnim
on doTaskAnim cName,cTask
global gThisTaskNum
if cTask <> gThisTaskNum then
goMName (cName & ".1")
else
if gThisTaskNum = 10 then
checkLetter cName
else if gThisTaskNum = 20 then
doMessUp cName
else if gThisTaskNum = 30 then
if ((cName contains "<") or (cName contains ">")) then --SN doesn't need that now
puppetSound "3DV15.AIF"
else
foundIngredient cName
end if
else if gThisTaskNum = 50 then
goMName (cName & ".2")
else if gThisTaskNum = 71 then
goMName (cName & ".2")
else if gThisTaskNum = 72 then
goMName (cName & ".2")
else if gThisTaskNum = 73 then
goMName (cName & ".2")
end if
end if
-- end doTaskAnim
on startLoop loopName,sNum1,sNum2
global gReturnMarker,gMagicSnd
set gReturnMarker = loopName
if not soundBusy(1) then puppetSound gMagicSnd
if integerP(sNum1) then
repeat with i = sNum1 to sNum2
set the immediate of sprite i to 1
end repeat
else
set the immediate of sprite 1 to 1
end if
wandToggle 1
--end startLoop
on stopLoop
-- EFB 8/6
global gReturnMarker
wandToggle 0
set gReturnMarker = empty
--end stopLoop
on returnLoop
global gReturnMarker,gThisTaskNum,gWandFlag
set taskFlag = checkTask() -- triggers BA Hint on click/time out
if taskFlag <> 1 then -- checkTask will return 0 if it needs to branch
if not (labelList() contains gReturnMarker) then -- debug
putMsge "ReturnLoop called without good mName" && gReturnMarker
beep 2
continue
else
set loopFrame = label(gReturnMarker) + 2
go loopFrame
if gWandFlag = 0 then wandToggle 1
end if
end if
--end returnLoop
on goMName markerName
if not (the labelList contains markerName) then -- debug
beep 2
putMsge "goMName Marker not found " && markerName
else
--put "GoMName (go to) " && markerName
go to markerName
end if
-- end goMName
on goMNameAdd baseMName,versionNum
set markerName = (baseMName & "." & versionNum)
goMName markerName
-- end goMNameAdd
on goNextMarker skipNum
if not integerP(skipNum) then set skipNum = 1
go marker(skipNum)
-- end go nextMarker
on goLoc markerName,locNum,transFlag
global gThisLoc,gMovieList,gTaskClickons,gTaskTicks,gAMoviePath,gThisTaskNum,gHideOffset
cursor 4
if locNum = 1 then -- CW for Ch.1,3,6
if (gThisTaskNum = 30 or gThisTaskNum = 31) then
set markerName = "3a.CW"
else if gThisTaskNum = 61 then
set markerName = "6a.CW"
end if
else if locNum = 2 then -- NY in Ch.3
if (gThisTaskNum = 30 or gThisTaskNum = 31) then
set markerName = "3b.NY"
end if
else if locNum = 10 then --CP in Ch.3
if (gThisTaskNum = 30 or gThisTaskNum = 31) then
set markerName = "3c.CP"
end if
else if locNum = 15 then --TC in Ch.5
if gThisTaskNum = 50 then
set markerName = "5a.TC"
end if
else if locNum = 16 then --AY in Ch.6
if gThisTaskNum = 61 then
set markerName = "6a.AY"
else if gThisTaskNum = 62 then
set markerName = "6b.AY"
end if
end if
set locString = string(locNum)
if length(locString) < 2 then set locString = ("0" & locString)
if "01,03,05,12,13" contains locString then
playTransMusic 1
else if "02,04,06,20" contains locString then
playTransMusic 2
else if "07,09" contains locString then
playTransMusic 4
else if "10,11,15,17" contains locString then
playTransMusic 5
else if "08,16,18,19" contains locString then
playTransMusic 3
end if
set movieName = item value(locNum) of gMovieList
goMovie markerName, movieName
-- end goLoc
on goChap chapNum
global gThisLoc,gDemoFlag,gThisTaskNum,gMovieList,gHideOffset
cursor 4
if chapNum = "Begin" then
playTransMusic 1
set markerName = "Banners"
set movieName = item 1 of gMovieList
else if chapNum = "ShortCuts" then
startAudio "CWM15","L1"
set markerName = "SCLoop"
set movieName = item 1 of gMovieList
else if chapNum = "ReadBook" then
playTransMusic 2
set markerName = "RB"
set movieName = item 20 of gMovieList
else if chapNum = "Title" then
set markerName = "Title"
set movieName = item 1 of gMovieList
else if chapNum = "1" then
playTransMusic 2
set markerName = "1a.NY"
set movieName = "Chap1"
else if chapNum = "1B.NK" then
set markerName = "1b.NK"
set movieName = item 3 of gMovieList
else if chapNum = "1B.NS" then
set markerName = "1b.NS"
set movieName = item 5 of gMovieList
else if chapNum = "Letter" then
playTransMusic 1
startTask 10
set markerName = "1b.NK"
set movieName = item 3 of gMovieList
else if chapNum = "2A" then
playTransMusic 2
set markerName = "2a.NK"
set movieName = item 3 of gMovieList --NK
else if chapNum = "2B" then
playTransMusic 2
set markerName = "2c.NY"
set movieName = "Chap2B"
else if chapNum = "3" then
playTransMusic 2
set gThisTaskNum = 31 -- special case for exit/retun to Chap3 before startTask 30
set markerName = "3a.NY"
set movieName = item 2 of gMovieList --NY
else if chapNum = "Grove" then
playTransMusic 5
set markerName = "3A.NY"
set movieName = item 2 of gMovieList --NY
else if chapNum = "4" then
playTransMusic 5
set markerName = "4a.NK"
set movieName = "Chap4"
else if chapNum = "4B" then
playTransMusic 1
set markerName = "4c.NY"
set movieName = "Chap4"
else if chapNum = "5B" then
playTransMusic 1
set markerName = "5b.NY"
set movieName = "Chap5B"
else if chapNum = "6B" then
playTransMusic 5
set markerName = "6b.AK"
set movieName = item 17 of gMovieList -- in CH.6B part of "AK" loc
else if chapNum = "7" then
playTransMusic 3
set markerName = "7a.AY"
set movieName = item 16 of gMovieList -- in CH.7 part of "AY" loc
else if chapNum = "7B" then
playTransMusic 3
set markerName = "7b.AK"
set movieName = item 17 of gMovieList -- in CH.7A part of "AK" loc
else if chapNum = "7C" then
playTransMusic 3
set markerName = "7c.HR"
set movieName = item 19 of gMovieList -- in CH.7A part of "AK" loc
else if chapNum = "HRClient" then
playTransMusic 3
set markerName = "7c.HR" -- need new marker to init clientList ?
set movieName = item 19 of gMovieList -- in CH.7A part of "AK" loc
else if chapNum = "7D" then
playTransMusic 3
set markerName = "7d.AK"
set movieName = item 17 of gMovieList -- in CH.7D part of "AK" loc
else if chapNum = "VRClient" then
playTransMusic 3
set markerName = "7d.AK"
set movieName = item 17 of gMovieList -- in CH.7D part of "AK" loc
else if chapNum = "7E" then
playTransMusic 3
set markerName = "7e.WR"
set movieName = item 18 of gMovieList -- in CH.7e part of "WR" loc
else if chapNum = "WRClient" then
playTransMusic 3
set markerName = "7e.WR" -- need new marker to init clientList ?
set movieName = item 18 of gMovieList -- in CH.7e part of "WR" loc
else if chapNum = "8" then
playTransMusic 1
set markerName = "8a.NY"
set movieName = "Chap8"
else if chapNum = "8c" then
playTransMusic 1
set markerName = "8c.CW"
set movieName = "Chap8"
end if
putMsge "goChap " && markerName && movieName
goMovie markerName,movieName
--end goChap
on goMovie markerName,MovieName,TransitionType
global gAMoviePath,gHardDrivePath,gStartLoad,gHDMovieList,gFreeMemKB
set moviePath = (gAMoviePath & movieName) & ".dir"
set gStartLoad = the ticks --debug
go to markerName of movie moviePath
--end goMovie
on playTransMusic songNum
global gHardDrivePath
if soundBusy(1) then
putMsge "playTransMusic called redundatly." --debug
else
putMsge "playTransMusic called " && songNum --debug
if songNum = 1 then
puppetSound "CWM51b.Snd"
--set sndName = "CWM11.AIF"
else if songNum = 2 then
puppetSound "CWM52b.Snd"
--set sndName = "CWM12.AIF"
else if songNum = 3 then
puppetSound "CWM53.Snd"
--set sndName = "CWM13.AIF"
else if songNum = 4 then
puppetSound "CWM54.Snd"
--set sndName = "CWM14.AIF"
else if songNum = 5 then
puppetSound "CWM55.Snd"
--set sndName = "CWM15.AIF"
end if
--set sndPath = (gHardDrivePath & sndName)
--sound playFile 1,sndPath
updateStage
end if
--playTransMusic
--***** Non-Runtime Macros ********
on getRegions fldNum,initFlag
set fldName = "RegionNums." & fldNum
if integerP(initFlag) then
set newRegions = "0,0"
else
set newRegions = the text of cast fldName
end if
putMsge "Get Regions"
set i = 20
repeat while i > 1
set thisCastNum = the castNum of sprite i
if thisCastNum <> 0 then
set cName = the name of cast thisCastNum
if cName contains "/" then
repeat with j = 1 to the number of lines in newRegions
if cName = item 9 of line j of newRegions or integerP(initFlag) then
putMsge "updated regions for: " && cName && j
put fillNum(the left of sprite i,3) into item 1 of line j of newRegions
put fillNum(the top of sprite i,3) into item 2 of line j of newRegions
put fillNum(the right of sprite i,3) into item 3 of line j of newRegions
put fillNum(the bottom of sprite i,3) into item 4 of line j of newRegions
set j = 25
else
if j = the number of lines in newRegions then
putMsge "No match for region/sprite:" && cName && i
end if
end if
end repeat
end if
end if
set i = i - 1
end repeat
set the text of cast fldName to newRegions
beep 3
-- getRegions
on fillNum baseNum,totalChar
set baseNum = string(baseNum)
repeat while length(baseNum) < totalChar
set baseNum = "0" & baseNum
end repeat
return(baseNum)
--end fillNum
on checkKey
put "Keydown" && the Key
if the Key = "`" then
putAudioTime
else if the Key = "h" then
hideMsge
else if the Key = "s" then
showMsge
end if
-- end ckeckKey
on putMsge mText
global gMsgeFlag
if gMsgeFlag = 1 then
if the number of lines in the text of cast "MessageField" > 30 then
set the text of cast "messageField" to empty
end if
set the text of cast "MessageField" to mText & RETURN & the text of cast "MessageField"
showMsge
else
put mText
end if
-- end putMsge
on clearMsge mText
set the text of cast "MessageField" to "Messages"
-- end putMsge
on showMsge mText
global gMsgeFlag
if the shiftDown then
set gMsgeFlag = 1
puppetSprite 21,1
end if
set the castNum of sprite 21 to the number of cast "Messages"
set the locV of sprite 21 to 300
updateStage
-- end putMsge
on hideMsge mText
global gMsgeFlag
if the shiftDown then
set gMsgeFlag = 0
puppetSprite 21,0
end if
set the locV of sprite 21 to 700
updateStage
-- end putMsge
on initLoadtest
global gStartLoad,gFreeMemKB
unloadCast
initBA
set gFreeMemKB = (the freeBytes)/1024
puppetSound "CWM51b.Snd"
putMsge "initLoadTest (Free Kb)" && (gFreeMemKB)
--end initLoadtest
on showLoadInfo
global gFreeMemKB,gStartLoad
putMsge "Load After Mem:" && (gFreeMemKB - (the freeBytes/1024)) && "Kb"
putMsge "Load After Time:" && ((the ticks - gStartLoad)/60 ) && "seconds"
--end showLoadInfo
on showArrays
global gLeftArray,gTopArray,gRightArray,gBottomArray
global gTypeArray,gOptionArray,gFlagArray,gCounterArray,gNameArray,gRegionTotal
set currentRegions = ""
repeat with i = 1 to gRegionTotal
put gLeftArray(mGet,i) & "," after currentRegions
put gTopArray(mGet,i) & "," after currentRegions
put gRightArray(mGet,i) & "," after currentRegions
put gBottomArray(mGet,i) & "," after currentRegions
put gTypeArray(mGet,i) & "," after currentRegions
put gOptionArray(mGet,i) & "," after currentRegions
put gFlagArray(mGet,i) & "," after currentRegions
put gCounterArray(mGet,i) & "," after currentRegions
put gNameArray(mGet,i) & "," after currentRegions
put RETURN after currentRegions
end repeat
putMsge "CurrentRegions:" & Return & currentRegions
--end showArrays