home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inventor Labs: Technology
/
INVENTORLABS_TECHNOLOGY.BIN
/
pc
/
files
/
edison.dir
/
00301_Script_rBulbExperimentMgr
< prev
next >
Wrap
Text File
|
1997-05-26
|
28KB
|
892 lines
-- o: light bulb exp mgr
-- instanciated as gBulbExpMgr
property pRollOverStartSprite, pMercBottleSprite, pFirstBulbSprite
property pMercConstraintCast, pMercMouseLeft, pMercMouseRight, pMercBottleHigh, pMercBottleLow
property pBulbQTDataList, pMercStepVHList, pVacuumLevel
property pLabState, pLabelTextCast, pQTSprite
property pRollOverLabCastList, pRollOverBulbCastList, pLBPuppetList
property pBackgroundSprite, pCoilLoadQT
property pCurrentBulbNum, pCurrentBulbName, pBulbSprite, pBulbInCast, pBulbOutCast
property pBulbRackSprite, pFullBulbRackCast, pSwitchSprite, pSwitchOffCast, pBurnQTNum
property pBulbQTData, pBulbTimeData, pBulbVOdata, pBurnBulbFlag, pQTPath, pBurnTime
property pSndPath, pOutComeVOFlag, pVO, pAttempts, pCongratFlag, pCloseUpSprite
property pFirstRackBulbSprite, pVGCloseUpFlag, pResultLabelSprite
property pBattZoomSprite, pVacZoomSprite, pBackOutSprite1, pPictureSprite, pNotebookSprite, pQTSprite19
property pDescriptionTextCast, pInstructionTextCast
property pLBExperimentRecordList, pCorrectVaccumLevel, pCorrectBulbNum
property pAtVGauge, pTestingBulb, pAmbientSnd, pFilimentDescpStrCst
property pToolBarSimSprite, pToolBarBulb
property pDamnThisCrappyCode
global gJournalObj, gInterfaceMgrObj, gScoreEventObj
global gMediaPat, gQTpath, gSndPath, gUtilityObj,gActiveAmbSnd
--====================================
on mInit me, myCastList, QTPath, SndPath
cursor 4
sound playFile 2, gSndPath & "ELTINTR2.AIF"
-- sprite declarations
set pBackgroundSprite = 2
set pFirstBulbSprite = 12
set pMercBottleSprite = 5
set pQTSprite = 20
set pBulbSprite = 7
set pBulbRackSprite = 3
set pSwitchSprite = 4
set pCloseUpSprite = 9
set pFirstRackBulbSprite = 12
set pResultLabelSprite = 24
set pBattZoomSprite = 13
set pVacZoomSprite = 14
set pBackOutSprite1 = 21
set pPictureSprite = 11
set pNotebookSprite = 19
set pQTSprite19 = 19
set pFilimentDescpStrCst = the number of cast "IRON"
set pAmbientSnd = "ELBULB.AIF"
-- set adjustment value for mouse on mercury bottle
set shiftSizeH = 20
set shiftSizeV = 20
set pMercMouseLeft = the locH of sprite pMercBottleSprite - (the left of sprite pMercBottleSprite + 20)
set pMercMouseRight = the locV of sprite pMercBottleSprite - (the Top of sprite pMercBottleSprite + 20)
set pMercBottleHigh = the top of sprite pBackgroundSprite + 208
set pMercBottleLow = the top of sprite pBackgroundSprite + 365
-- cast declarations
--/ temporary measure
set pLabelTextCast = the number of cast "labelTxt"
set pDescriptionTextCast = the number of cast "descrTxt"
set pInstructionTextCast = the number of cast "instrTxt"
--/
set pMercConstraintCast = the number of cast "mercConstraintCast"
set pCoilLoadQT = the number of cast "ELTSNAPC.MOV"
set pBulbInCast = the number of cast "ELTMT1.PIC"
set pBulbOutCast = the number of cast "ELTMT2.PIC"
set pFullBulbRackCast = the number of cast "ELTRK.PIC"
set pSwitchOffCast = the number of cast "ELTSWOF.PIC"
set pBurnBulbFlag = the number of cast "burnBulbFlag"
set pOutComeVOFlag = the number of cast "outcomeAudioFlag"
set pCongratFlag = the number of cast "congratQTFlag"
set pVGCloseUpFlag = the number of cast "vacGaugeFlag"
set pPlaceHolderCst = the number of cast "mainInterfacePlaceHolder"
-- init lists
mInitLists (me)
set pMercStepVHList = [301:139, 329:161, 361:180, 392:200, 420:217]
-- initial state
set pVacuumLevel = 1
set pAttempts = 0
set pCurrentBulbNum = 0
set pLBExperimentRecordList = []
set pCorrectVaccumLevel = 5
set pCorrectBulbNum = 8
repeat with counter = 1 to 40
setAt (pLBExperimentRecordList, counter, 0)
end repeat
set pQTPath = gQTPath
set pSndPath = gSndPath
set pAtVGauge = false
set pTestingBulb = false
set pDamnThisCrappyCode = the text of cast "bulbRollOvers"
return (me)
end
----------------------------------------------
-------------------------------------------------------------------------------------------------------------------
-- dont pay attetion to lingering highlights ... just functionality
-------------------------------------------------------------------------------------------------------------------
on mOperate me, whatSelection
cursor 4
if pTestingBulb then
sound Stop (2)
mUnSetOneCursor (gUtilityObj, 18)
puppetSprite 21, false
puppetSprite 20, false
puppetSprite 24, false
puppetSprite 10, false
puppetSprite 16, false
updateStage
else if pAtVGauge then mClearVacGCloseUp(me)
if whatSelection = 1 then
go "chooseBulb"
--PREVIOUS BULB
if pCurrentBulbNum < 2 then set NewBulb = 8
else set NewBulb = pCurrentBulbNum - 1
set pToolBarSimSprite = NewBulb + (pFirstBulbSprite - 1)
set pToolBarBulb = TRUE
set pCurrentBulbNum = NewBulb
set the text of cast pLabelTextCast = line pCurrentBulbNum of pDamnThisCrappyCode
set the text of cast pInstructionTextCast = the text of cast (pFilimentDescpStrCst + pCurrentBulbNum - 1)
mClearToolHilite ( gInterfaceMgrObj )
else if whatSelection = 4 then
--PREVIOUS MERCURY BOTTLE
if pToolBarBulb then
mBulbChosen(me, pToolBarSimSprite)
set the movierate of sprite 20 = 1
repeat while the movierate of sprite 20 = 1
updatestage
end repeat
mSetBulb me
end if
if pVacuumLevel > 1 then
set NewVacuumLevel = pVacuumLevel - 1
set WhichStepIndex = 6 - NewVacuumLevel
mToolBarVacuumMercuryMove(me, whichStepIndex)
else go frame "LBBaseState"
mClearToolHilite ( gInterfaceMgrObj )
else if whatSelection = 3 then
--NEXT BULB
go "chooseBulb"
if pCurrentBulbNum > 7 then set NewBulb = 1
else set NewBulb = pCurrentBulbNum + 1
set pToolBarSimSprite = NewBulb + (pFirstBulbSprite - 1)
set pToolBarBulb = TRUE
set pCurrentBulbNum = NewBulb
set the text of cast pLabelTextCast = line pCurrentBulbNum of pDamnThisCrappyCode
set the text of cast pInstructionTextCast = the text of cast (pFilimentDescpStrCst + pCurrentBulbNum - 1)
mClearToolHilite ( gInterfaceMgrObj )
else if whatSelection = 2 then
--NEXT MERCURY BOTTLE
if pToolBarBulb then
mBulbChosen(me, pToolBarSimSprite)
set the movierate of sprite 20 = 1
repeat while the movierate of sprite 20 = 1
updatestage
end repeat
mSetBulb me
end if
if pVacuumLevel < 5 then
set NewVacuumLevel = pVacuumLevel + 1
set WhichStepIndex = 6 - NewVacuumLevel
mToolBarVacuumMercuryMove(me, whichStepIndex)
else go frame "LBBaseState"
mClearToolHilite ( gInterfaceMgrObj )
else if whatSelection = 5 then
if pToolBarBulb then
mBulbChosen(me, pToolBarSimSprite)
set the movierate of sprite 20 = 1
repeat while the movierate of sprite 20 = 1
updatestage
end repeat
end if
--SWITCH ON
mFlipSwitch(me)
else if whatSelection = 6 then
--SWITCH OFF
end if
cursor -1
end mOperate
-------------------------------------------------------------------------------------------------------------------
on mToolBarVacuumMercuryMove me, whichStepIndex
set tempV = getPropAt(pMercStepVHList, whichStepIndex)
set the locV of sprite pMercBottleSprite = tempV
set the locH of sprite pMercBottleSprite = getAProp(pMercStepVHList, tempV)
set pVacuumLevel = 6 - whichStepIndex
puppetsound "MERC.AIF"
updateStage
go frame "playMerc"
end mToolBarVacuumMercuryMove
-------------------------------------------------------------------------------------------------------------------
on mZoom me, whatSelection
set gActiveAmbSnd = pAmbientSnd
cursor 4
if not pTestingBulb then
if pAtVGauge then mClearVacGCloseUp(me)
if whatSelection = 1 then mBattCloseUp (me)
else if whatSelection = 2 then mVGCloseUp (me)
else if whatSelection = 3 then
--SWITCH
end if
end if
mClearToolHilite ( gInterfaceMgrObj )
cursor -1
end mZoom
-------------------------------------------------------------------------------------------------------------------
on mInitLightBulbSequence me
-- puppets
puppetSprite pMercBottleSprite, true
puppetSprite pBulbSprite, true
puppetSprite pBulbRackSprite, true
mInformJournal(gJournalObj, #ArrivingAtBIY)
mSetToolBtns (gInterfaceMgrObj, #EBYS, me)
set gActiveAmbSnd = pAmbientSnd
cursor -1
end
----------------------------------------------
on mCloseLightBulbSequence me
set gActiveAmbSnd = pAmbientSnd
if soundBusy (2) then sound stop (2)
set the locv of sprite pQTSprite = -1000
puppetSprite pMercBottleSprite, false
puppetSprite pBulbSprite, false
puppetSprite pBulbRackSprite, false
puppetSprite pQTSprite, false
puppetSprite pResultLabelSprite, false
-- cursors
mUnSetCursors (gUtilityObj)
-- text
mClearText (me)
mInformJournal(gJournalObj, #LeavingBIY)
end
----------------------------------------------------------------------------ò
on mClearText me
set the text of cast pLabelTextCast = " "
set the text of cast pDescriptionTextCast = " "
set the text of cast pInstructionTextCast = " "
end
----------------------------------------------------------------------------ò
on mPlayIntro me
sound playFile 2, pSndPath & "ELTINTR2.AIF"
end
----------------------------------------------------------------------------ò
on mSetLBState me, whichState
set gActiveAmbSnd = pAmbientSnd
set pLabState = whichState
if (whichState = #viewLab) then
mUnSetCursors (gUtilityObj)
mSetLBBaseCursors (me)
set the text of cast pDescriptionTextCast = " "
set the text of cast pInstructionTextCast = the text of cast "LBInstructions"
else if (whichState = #viewBulbs) then
if soundBusy(2) then sound stop 2
mUnSetCursors (gUtilityObj)
mSetViewBulbCursors (me)
end if
end
----------------------------------------------------------------------------ò
---------------- CURSORS -----------------------------------------------
----------------------------------------------------------------------------ò
on mSetLBBaseCursors me
set cursorList = [:]
setaprop(cursorList,pBattZoomSprite,#ZoomIn)
addProp(cursorList,pVacZoomSprite,#ZoomIn)
addProp(cursorList,pMercBottleSprite,#Operate)
addProp(cursorList,pBulbRackSprite,#Operate)
addProp(cursorList,pSwitchSprite,#Bolt)
addProp(cursorList,pPictureSprite,#Operate)
mSetCursors (gUtilityObj, cursorList)
mSetBackOutCursors (me)
end
----------------------------------------------------------------------------ò
on mSetViewBulbCursors me
set gActiveAmbSnd = pAmbientSnd
set cursorList = [:]
repeat with spriteCounter = pFirstRackBulbSprite to pFirstRackBulbSprite + 8
addProp(cursorList,spriteCounter,#Operate)
end repeat
mSetCursors (gUtilityObj, cursorList)
mSetBackOutCursors (me)
end
----------------------------------------------------------------------------ò
on mSetBackOutCursors me
set cursorList = [:]
setaprop(cursorList,pBackOutSprite1,#RETURN)
addProp(cursorList,pBackOutSprite1 + 1,#RETURN)
mSetCursors (gUtilityObj, cursorList)
end
----------------------------------------------------------------------------ò
----------------------------------------------------------------------------ò
on mInitLists me
-- lab rollOver list
set labRollOverFlag = the number of cast "wallPicture" - 1
set rollOverItems = the text of cast "labRollOvers"
set pRollOverLabCastList = [:]
repeat with rollCntr = 1 to the number of lines in rollOverItems
addProp(pRollOverLabCastList, rollCntr + labRollOverFlag , line rollCntr of rollOverItems)
end repeat
-- bulb rollOver list
set bulbRollOverFlag = the number of cast "bulbRollOverFlag" - 1
set rollOverItems = the text of cast "bulbRollOvers"
set pRollOverBulbCastList = [:]
repeat with rollCntr = 1 to the number of lines in rollOverItems
addProp(pRollOverBulbCastList, rollCntr + bulbRollOverFlag , line rollCntr of rollOverItems)
end repeat
--/ Temporary Measure
set pBulbQTData = the text of cast "filiment_QTdata"
set pBulbTimeData = the text of cast "filiment_timedata"
set pBulbVOdata = the text of cast "filiment_VOdata"
end
----------------------------------------------
on mCompileList me, whichDataCast
set listData = the text of cast whichDataCast
set tempList = [:]
repeat with lineCnt = 2 to 9
set theProperty = value(item 1 of line lineCnt of listData)
set theOutcome = string(item 2 of line lineCnt of listData)
repeat with outcomeCnt = 3 to 6
set theOutcome = theOutcome &", " & item outcomeCnt of line lineCnt of listData
end repeat
addProp(tempList, theProperty, theOutcome)
end repeat
return (tempList)
end
----------------------------------------------
on mBulbChosen me, whichSprite
set pToolBarBulb = FALSE
puppetsound "BULB5.AIF"
updatestage
set pCurrentBulbNum = whichSprite - (pFirstBulbSprite - 1)
set the castNum of sprite pBulbRackSprite = pFullBulbRackCast + pCurrentBulbNum
set gActiveAmbSnd = 0
if (pCurrentBulbNum < 5) then go frame "loadCoil"
else go frame "loadLoop"
end
----------------------------------------------
on mCheckRollOvers me
if (pLabState = #viewLab) then
set tempText = getaProp(pRollOverLabCastList, the mouseCast)
if (not voidP(tempText)) then set the text of cast pLabelTextCast = tempText
else set the text of cast pLabelTextCast = "INCANDESCENT LIGHT BULB EXPERIMENT (1879)"
end if
if (pLabState = #viewBulbs) then
set tempText = getaProp(pRollOverBulbCastList, the mouseCast)
set CstOffset = getpos(pRollOverBulbCastList,tempText) - 1
if (not voidP(tempText)) then
set the text of cast pLabelTextCast = tempText
set the text of cast pInstructionTextCast = the text of cast (pFilimentDescpStrCst + CstOffset)
end if
end if
go the frame
end
----------------------------------------------
on mGrabMercBottle me
mUnSetAllCursors( gUtilityObj )
mSetGeneralCursor ( gUtilityObj, #ClosedHand)
set origv = the mousev
set voffset = origv - the locv of sprite pMercBottleSprite
set hoffset = the mouseh - the loch of sprite pMercBottleSprite
go "MoveMerc"
repeat while the mousev = origv
end repeat
if soundBusy(2) then sound stop 2
set firsttime = TRUE
repeat while (the mouseDown) or firsttime
set mousev = (the mousev - voffset)
if mousev < 288 then set mousev = 288
else if mousev > 445 then set mousev = 445
set the locv of sprite pMercBottleSprite = mousev
set the loch of sprite pMercBottleSprite = (mousev - 445 ) * .5 + 232
updatestage
if firsttime then set firsttime = FALSE
end repeat
cursor 4
set whichStepIndex = (mousev - pMercBottleHigh)/((pMercBottleLow - pMercBottleHigh)/5) + 1 -- 1: elim 0
if (whichStepIndex > 5) then set whichStepIndex = 5
else if (whichStepIndex < 1) then set whichStepIndex = 1
set tempV = getPropAt(pMercStepVHList, whichStepIndex)
set the locV of sprite pMercBottleSprite = tempV
set the locH of sprite pMercBottleSprite = getAProp(pMercStepVHList, tempV)
set pVacuumLevel = 6 - whichStepIndex
puppetsound "MERC.AIF"
updatestage
set gActiveAmbSnd = 0
end
----------------------------------------------
on mPlaySwitchQT me
if the movieRate of sprite pQTSprite = 1 then go the frame
end
----------------------------------------------
on mFlipSwitch me
set pTestingBulb = true
if soundBusy(2) then sound stop 2
set pAttempts = pAttempts + 1
sound stop 1
set gActiveAmbSnd = 0
go frame "flipSwitch"
mUnSetCursors (gUtilityObj)
end
----------------------------------------------
on mPlayLoadBulbQT me
if the movieRate of sprite pQTSprite = 1 then go the frame
else
mSetBulb me
go frame "LBBaseState"
end if
end
----------------------------------------------
on mSetBulb me
set gActiveAmbSnd = pAmbientSnd
puppetsprite pBulbSprite, True
set the castNum of sprite pBulbSprite = pBulbInCast
end
----------------------------------------------
on mEvalResults me
set gActiveAmbSnd = 0
-- check if all items set
if (pCurrentBulbNum<> 0) then
--Update Experiment Record for Journal
set RecordIndex = (pVacuumLevel - 1) * 8 + pCurrentBulbNum
setAt (pLBExperimentRecordList, RecordIndex, 1)
-- if so set set results
set tempItem = pVacuumLevel + 1
set pBurnQTNum = item tempItem of line pCurrentBulbNum of pBulbQTData
set pBurnTime = item tempItem of line pCurrentBulbNum of pBulbTimeData
set pVO = item tempItem of line pCurrentBulbNum of pBulbVOdata
-- go to bulb movie frame
if (pCurrentBulbNum< 5) then go frame "turnOnCoil"
else go frame "turnOnLoop"
else
sound playfile 2, gsndpath & "ELTHNT0.AIF"
set pTestingBulb = false
mClearToolHilite ( gInterfaceMgrObj )
go frame "LBBaseState"
end if
end
----------------------------------------------
on mbulbCont me
sound Stop (2)
mUnSetOneCursor (gUtilityObj, 18)
puppetSprite 21, false
puppetSprite 20, false
puppetSprite 24, false
puppetSprite 10, false
puppetSprite 16, false
updateStage
set pCurrentBulbNum = 0
go "Bulb cont"
end mbulbCont
----------------------------------------------
on mInitBulb me
sound stop 1
updateStage
set gActiveAmbSnd = 0
mSetCursors (gUtilityObj, [18:#zoomout])
mSetBackOutCursors (me )
puppetSprite 16, true
puppetSprite pQTSprite, true
set the castNum of sprite pQTSprite = pBurnBulbFlag + pBurnQTNum
set the locH of sprite pQTsprite = 198
set the locV of sprite pQTsprite = 209
set the movieRate of sprite pQTSprite = 1
end mInitBulb
----------------------------------------------------------------------------ò
on mPlayBottleQT me
if (the mousedown) and (the clickon = pMercBottleSprite) then
go "MoveMerc"
else if the movieRate of sprite pQTSprite = 1 then go the frame
end mPlayBottleQT
----------------------------------------------------------------------------ò
on mResetQT me
sound stop 1
set the movieRate of sprite pQTSprite = 1
end mResetQT
----------------------------------------------------------------------------ò
on mClearAndGoToBase me
if (the movieRate of sprite pQTSprite = 1) then set the movieRate of pQTSprite = 0
if soundBusy (2) then sound stop (2)
end
----------------------------------------------------------------------------ò
on mDisplayResult me
set gActiveAmbSnd = pAmbientSnd
puppetSprite pQTSprite, false
puppetSprite pResultLabelSprite, true
set the castnum of sprite pResultLabelSprite = the number of cast "timeLitDisplayFlag" + pBurnTime
set the locV of sprite pResultLabelSprite = 400
set the locH of sprite pResultLabelSprite = 217
updateStage
end
----------------------------------------------
on mPlayOutComeVO me
if (pVO <> 8) then -- 8 is flagged as the correct combo
set whichVO = the name of cast (pOutComeVOFlag + pVO)
set whichVO = pSndPath & whichVO
sound playFile 2, whichVO
updateStage
else
set endticks = the ticks + 60
repeat while ( the ticks < endticks)
updatestage
end repeat
puppetSprite 16,false
puppetSprite pQTSprite, false
puppetSprite pResultLabelSprite, false
go frame "congrads"
end if
end
----------------------------------------------
on mEjectBulb me
puppetSprite pQTSprite, false
updateStage
end
----------------------------------------------
on mPlayCongradsVid me
set gActiveAmbSnd = 0
sound stop 1
updatestage
if pAttempts < 8 then set congradVidNum = 1
else if pAttempts < 15 then set congradVidNum = 2
else set congradVidNum = 3
puppetsprite pBulbSprite, false
puppetsprite pQTSprite, true
if congradVidNum > 1 then set the rect of sprite pQTSprite = rect (240, 140, 480, 440)
else set the rect of sprite pQTsprite = rect(260, 140, 480, 440)
set the castNum of sprite pQTSprite = pCongratFlag + congradVidNum
updatestage
set the movierate of sprite pQTsprite = 1
end
----------------------------------------------------------------------------------------------------------
on msetattempts me, howmany
set pAttempts = howmany
end msetattempts
----------------------------------------------------------------------------------------------------------
on mResetBulbs me
sound stop 1
updatestage
set gActiveAmbSnd = 0
puppetSprite 16, false
puppetsprite pBulbSprite, true
set the castNum of sprite pBulbSprite = pBulbOutCast
set the castNum of sprite pBulbRackSprite = pFullBulbRackCast
mClearToolHilite ( gInterfaceMgrObj )
puppetSprite pResultLabelSprite, false
set the movieRate of sprite 23 = 1
end
----------------------------------------------
on mEndLightBulbTest me
set pTestingBulb = false
go frame "LBBaseState"
end mEndLightBulbTest
----------------------------------------------
on mEndCongradsVid me
puppetsprite pQTSprite, false
set pTestingBulb = false
go frame "LBBaseState"
puppetsprite pBulbSprite, TRUE
end mEndCongradsVid
----------------------------------------------
on mClose me
if the casttype of cast (the castnum of sprite pQTSprite) = #DigitalVideo then
set the movierate of sprite pQTSprite = 0
end if
set the locv of sprite pQTSprite = -1000
set the locv of sprite pBulbSprite = -1000
updatestage
repeat with Counter = 1 to 23
puppetSprite Counter, false
end repeat
mUnSetCursors (gUtilityObj)
end
----------------------------------------------
on mPullout me
sound stop 2
mInformJournal (gJournalObj, #LeavingBIY)
mDenyClicks ( gUtilityObj )
mClose ( me )
mGoFrameAndPullOut (gScoreEventObj, "lightpo")
end mPullout
----------------------------------------------
on mVGCloseUp me
if soundBusy(2) then sound stop 2
mUnSetOneCursor (gUtilityObj, pBattZoomSprite)
mUnSetOneCursor (gUtilityObj, pVacZoomSprite)
go frame "VGClose"
set the text of cast pInstructionTextCast = the text of cast "Gauge Zoom"
set the text of cast pLabelTextCast = "VACUUM GAUGE"
end
----------------------------------------------
on mSetVGauge me
set pAtVGauge = true
puppetsprite pCloseUpSprite, true
updateStage
set the castNum of sprite pCloseUpSprite = pVGCloseUpFlag + pVacuumLevel
mSetCursors (gUtilityObj, [8:#zoomout])
end
----------------------------------------------
on mClearVacGCloseUp me
mUnSetCursors ( gUtilityObj )
set pAtVGauge = false
puppetSprite pCloseUpSprite, false
go frame "LBBaseState"
updateStage
mSetCursors (gUtilityObj, [21:#return,22:#return])
mSetLBBaseCursors (me, #set)
set the text of cast pInstructionTextCast = the text of cast "LBInstructions"
set the text of cast pLabelTextCast = "INCANDESCENT LIGHT BULB EXPERIMENT (1879)"
end
----------------------------------------------------------------------------ò
on mBattCloseUp me
if soundBusy(2) then sound stop 2
mUnSetOneCursor (gUtilityObj, pBattZoomSprite)
go frame "BattClose"
set the text of cast pInstructionTextCast = the text of cast "battery zoom"
set the text of cast pLabelTextCast = "BATTERY"
mSetBackOutCursors (me )
mSetCursors (gUtilityObj, [9:#zoomout])
end
----------------------------------------------
on mPlayframeQT me
if the movieRate of sprite pQTSprite = 1 then go the frame
end
----------------------------------------------
on mDisplaynotes me
if soundBusy(2) then sound stop 2
go frame "notes"
mSetBackOutCursors (me )
end mDisplaynotes
----------------------------------------------
on mDisplayPicture me
if soundBusy(2) then sound stop 2
set the text of cast pDescriptionTextCast = " "
set the text of cast pInstructionTextCast = the text of cast "BYS Edison Pict"
mUnSetCursors (gUtilityObj)
go frame "showPicture"
mSetBackOutCursors (me )
end
----------------------------------------------------------------------------ò
--------------------------------------------------------------------<<ò>>
--JOURNAL RELATED METHODS
--------------------------------------------------------------------<<ò>>
on mSwitchToJournal me
if soundBusy (2) then sound stop (2)
-- puppets
puppetSprite pMercBottleSprite, false
puppetSprite pBulbSprite, false
puppetSprite pBulbRackSprite, false
puppetSprite pQTSprite, false
puppetSprite pResultLabelSprite, false
puppetSprite 16, false
set the locv of sprite pQTSprite = -1000
-- cursors
mUnSetCursors (gUtilityObj)
mClearText (me)
go frame "LB_Jrnl"
end mSwitchToJournal
--------------------------------------------------------------------<<ò>>
on mSwitchToBIY me
go frame "LBBaseState"
puppetSprite pMercBottleSprite, true
set whichStepIndex = 6 - pVacuumLevel
set tempV = getPropAt(pMercStepVHList, whichStepIndex)
set the locV of sprite pMercBottleSprite = tempV
set the locH of sprite pMercBottleSprite = getAProp(pMercStepVHList, tempV)
puppetSprite pBulbSprite, true
puppetSprite pBulbRackSprite, true
set the castNum of sprite pBulbSprite = pBulbOutCast
set the castNum of sprite pBulbRackSprite = pFullBulbRackCast
end mSwitchToBIY
--------------------------------------------------------------------<<ò>>
on mReviewExperiment me, argRowClicked, argCollumClicked
set pVacuumLevel = argCollumClicked
set pCurrentBulbNum = argRowClicked
go frame "LBBaseState"
puppetSprite pMercBottleSprite, true
puppetSprite pBulbSprite, true
puppetSprite pBulbRackSprite, true
-----------
--SET MERCURY BOTTLE LOCATION
set whichStepIndex = 6 - pVacuumLevel
set tempV = getPropAt(pMercStepVHList, whichStepIndex)
set the locV of sprite pMercBottleSprite = tempV
set the locH of sprite pMercBottleSprite = getAProp(pMercStepVHList, tempV)
-----------
--SET PROPER LIGHTBULB TRAY PICT
set the castNum of sprite pBulbRackSprite = pFullBulbRackCast + pCurrentBulbNum
-----------
updateStage
if soundBusy(2) then sound stop 2
go frame "flipSwitch"
mUnSetCursors (gUtilityObj)
end mReviewExperiment
--------------------------------------------------------------------<<ò>>
on mDiscloseCorrectX me
return pCorrectVaccumLevel
end mDiscloseCorrectX
--------------------------------------------------------------------<<ò>>
on mDiscloseCorrectY me
return pCorrectBulbNum
end mDiscloseCorrectY
--------------------------------------------------------------------<<ò>>
on mDiscloseTestRecord me
return pLBExperimentRecordList
end mDiscloseTestRecord
--------------------------------------------------------------------<<ò>>
--------------------------------------------------------------------<<ò>>
--------------------------------------------------------------------<<ò>>