home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inventor Labs: Technology
/
INVENTORLABS_TECHNOLOGY.BIN
/
pc
/
files
/
shared.cst
/
00020_Script_rQTNavMgr
< prev
next >
Wrap
Text File
|
1997-07-24
|
32KB
|
952 lines
--o: QT Nav Mgr
-- gQTNavMgr
global gQTNavMgr, gEventMgrRD, gActorListMgrObj, gInterfaceMgrObj, gUtilityObj, gSndPath
property pStartDragV, pStartDragH
property pMaxImageV, pMaxImageH, pCurrImageV, pCurrImageH
property pPixToFrames, pDragImageV, pDragImageH, pQTSprite, pQTFramesPerImage
property pMyStatus, pImageNumber, pNavMovieCast
property pWhichNavMovie
property pHandMaskPath, pReelMaskPath, pShutMaskPath, pViewMaskPath
property pPHSweetSpotList, pAESweetSpotList, pSESweetSpotList, pPASweetSpotList
property pTargetVertical, pTargetHorizontal, pVertStep, pHorStep
property pWhichSpotNum, pPhonoAnimFlag, pAEFlyRightAnim
property pStylusZoom1, pStylusZoom2
property pSndPath, pQTPath, pSndChannel, pKGAnimFlag, pSEAnimFlag
property pFramesPerLineH, pHandleRectList, pStylusRectList, pReelRectList, pShutterRectList, pViewRectList
property pQTRect, pBkgdSprite
property pHandCursor, pZoomInCursor, pZoomOutCursor,
property pHandleRect, pStylusRect, pReelRect, pShutterRect, pViewRect
property pOrderedCursorList, pOrderedHotSpotRectList, pOrderedHotSpotList, pHotSpotStatus
property pLastFrameNum
property pAEBodyRectList, pAEWingRectList, pAEBodyRect, pAEWingRect, pAEAnimFlag
property pRevealCursor, pMouthRect, pHayRect, pEarRect, pPAAnimFlag
property pMouthRectList, pHayRectList, pEarRectList, pCylRectList, pCondRectList, pArmRectList
property pCylRect, pCondRect, pArmRect
property pPAPlayMovieLocList, pCursorReturnList
property pLabelTextCast, pDescriptionTextCast, pInstructionTextCast, pBaseText
property pOldMouseV, pOldMouseH, pCurrSweetSpotList, pRotateFrame, pCurrExpText
property pRevealList, pZoomList
property pRotateDirectionList,pPGSnd,pPGSndList, pKGSweetSpotList
property pQTplaySprite, pBaseQTlocV
property pLoadFoil, pActiveToolMenu
property pAcitiveAmbSnd, pSecondaryText, pTinFoilLoadText
global gActiveFunctionObj, gInventorIndexNum
global gEdisonFilmed, gMouseDownExp, gactiveambsnd
--
on mInit me, myCastList, QTDirectorypath, SndDirectoryPath
set pQTSprite = 14
set pQTplaySprite = 23
set pBkgdSprite = 6
set pSndChannel = 2
set pMaxImageV = 25
set pMaxImageH = 36
set pPixToFrames = 10
set pQTFramesPerImage = 60
set pPHSweetSpotList = [433:"13,19",451:"13,1",865:"25,1",460:"13,28",442:"13,10"]
set pKGSweetSpotList = [442:"13,10",460:"13,28",865:"25,1",433:"13,1",451:"13,19"]
set pAESweetSpotList = [0:"1,1",441:"13,10",864:"25,1",432:"13,1",450:"13,19"]
set pPASweetSpotList = [585:"17,10",567:"16,28",594:"17,19",576:"17,1"]
set pSESweetSpotList = [458:"13,28",440:"13,9",449:"13,18",467:"13,36"]
set pPAPlayMovieLocList = ["243,290","242,275","230,288","247,288"]
set pPGSndList = ["EPHAUD1.AIF","EPHAUD2.AIF","EPHAUD3.AIF","EPHAUD4.AIF","EPHAUD5.AIF","EPHAUD5.AIF"]
set pPGSnd = getAt(pPGSndList,2)
set pFramesPerLineH = pMaxImageH * pQTFramesPerImage
set pAEFlyRightAnim = 3
MoveBar( 5 )
set pHandleRectList = the text of cast (getaProp(myCastList,#pHandleRectList))
set pStylusRectList = the text of cast (getaProp(myCastList,#pStylusRectList))
set pReelRectList = the text of cast (getaProp(myCastList,#pReelRectList))
set pShutterRectList = the text of cast (getaProp(myCastList,#pShutterRectList))
set pViewRectList = the text of cast (getaProp(myCastList,#pViewRectList))
set pAEBodyRectList = the text of cast (getaProp(myCastList,#pAEBodyRectList))
set pAEWingRectList = the text of cast (getaProp(myCastList,#pAEWingRectList))
set pMouthRectList = the text of cast (getaProp(myCastList,#pMouthRectList))
set pHayRectList = the text of cast (getaProp(myCastList,#pHayRectList))
set pEarRectList = the text of cast (getaProp(myCastList,#pEarRectList))
set pCylRectList = the text of cast (getaProp(myCastList,#pCylRectList))
set pCondRectList = the text of cast (getaProp(myCastList,#pCondRectList))
set pArmRectList = the text of cast (getaProp(myCastList,#pArmRectList))
set pCursorReturnList = [21:#RETURN,22:#RETURN]
set pQTRect = rect(60, 80, 420, 440)
set pRotateDirectionList = [1:"0,-1",2:"1,-1",2:"1,0",3:"1,0",4:"1,1",5:"0,1",6:"-1,1",7:"-1,0",8:"-1,-1"]
set pLabelTextCast = the number of cast "labelTxt"
set pDescriptionTextCast = the number of cast "descrTxt"
set pInstructionTextCast = the number of cast "instrTxt"
set pSndPath = SndDirectoryPath
set pQTPath = QTDirectorypath
set pOrderedHotSpotRectList = []
set pMyStatus = 0
return (me)
MoveBar( 5 )
end
--
on mSetNavQTFlags me
if gInventorIndexNum = 1 then --edison
set pPhonoAnimFlag = the number of cast "phonoAnimFlag"
set pKGAnimFlag = the number of cast "KGAnimFlag"
set pStylusZoom1 = the number of cast "EPHZM1B.MOV"
set pStylusZoom2 = the number of cast "EPHZM2.MOV"
else if gInventorIndexNum = 2 then --bell
set pAEAnimFlag = the number of cast "AEAnimFlag"
set pPAAnimFlag = the number of cast "PAAnimFlag"
else
set pSEAnimFlag = the number of cast "SEAnimFlag"
end if
end mSetNavQTFlags
--
on mClose me
mDeactivate me
end mClose
---
on mDeactivate me
if (soundBusy (pSndChannel)) then sound stop pSndChannel
mClearText (me)
mDeleteFromActorlist (gActorListMgrObj, me)
mUnSetCursors (gUtilityObj)
set gActiveFunctionObj = empty
set the visible of sprite pQTsprite = TRUE
puppetsprite pQTplaySprite, FALSE
end
on mInitFoilPhono me
cursor 4
set pTinFoilLoadText = the text of cast "TinFoi Load Text"
set pAcitiveAmbSnd = gactiveambsnd
set pNavMovieCast = the number of cast "EPHNAV.MOV"
set pWhichNavMovie = #FoilPhono
set pOrderedHotSpotList = [#handle,#stylus,#QTRect]
set pOrderedCursorList = [#Operate, #ZoomIn, #Standard]
set pHotSpotStatus = #empty
set pCurrSweetSpotList = pPHSweetSpotList
set pRotateFrame = "rotateImage"
set pCurrExpText = the text of cast "PGOperateTxt"
set pRevealList = []
set pZoomList = ["stylusZoom1","stylusZoom2"]
set pLoadFoil = FALSE
set whichStartSweetSpot = 1
set startPoint = getAt(pPHSweetSpotList, whichStartSweetSpot)
set pSecondaryText =[the number of cast "PGOperateTxt" ,the number of cast "PGStylusZ1Txt"]
mplayIntroAudio (me)
set pBaseText = the text of cast "PhonoInstructions"
set the text of cast pInstructionTextCast = pBaseText
set gActiveFunctionObj = me
set pActiveToolMenu = #None
mSetToolBtns (gInterfaceMgrObj, #TINFOIL, me)
mAddToActorlist (gActorListMgrObj, me)
set the visible of sprite pQTSprite = FALSE
set pCursorList = [21:#RETURN,22:#RETURN]
end
on mInitKinetograph me
cursor 4
set pAcitiveAmbSnd = gactiveambsnd
set pNavMovieCast = the number of cast "EKGNAV.MOV"
set pWhichNavMovie = #Kinetograph
set pOrderedHotSpotList = [#shutter,#viewer,#reel,#QTRect]
set pOrderedCursorList = [#ZoomIn,#ZoomIn,#Operate, #Standard]
set pHotSpotStatus = #empty
set pCurrSweetSpotList = pKGSweetSpotList
set pRotateFrame = "rotateKG"
set pCurrExpText = the text of cast "KGOperateTxt"
set pRevealList = []
set pZoomList = [ "viewZoom","shutterZoom"]
set whichStartSweetSpot = 2
set startPoint = getAt(pPHSweetSpotList, whichStartSweetSpot)
mplayIntroAudio (me)
set pSecondaryText =[the number of cast "KGShutterTxt",the number of cast "KGViewText" ]
set pBaseText = the text of cast "KinetoInstructions"
set the text of cast pInstructionTextCast = pBaseText
set gActiveFunctionObj = me
mSetToolBtns (gInterfaceMgrObj, #KINGRAPH, me)
set pActiveToolMenu = #None
mAddToActorlist (gActorListMgrObj, me)
set the visible of sprite pQTSprite = FALSE
set pCursorList = [21:#RETURN,22:#RETURN]
end
on mInitSteamEngine me
set pAcitiveAmbSnd = gactiveambsnd
set pNavMovieCast = the number of cast "WSENAV1.MOV"
set pWhichNavMovie = #SteamEngine
set pOrderedHotSpotList = [#cylinder,#condenser,#arm,#QTRect]
set pOrderedCursorList = [#Reveal, #Reveal, #Operate, #Standard]
set pHotSpotStatus = #empty
set pCurrSweetSpotList = pSESweetSpotList
set pRotateFrame = "rotateSE"
set pCurrExpText = the text of cast "SEOperateTxt"
set pRevealList = ["playCylinder", "playCondenser"]
set pZoomList = []
set pSecondaryText =[the number of cast "SECylinderTxt" ,the number of cast "SECondenserTxt" ]
mplayIntroAudio (me)
set pBaseText = the text of cast "SEInstructionTxt"
set the text of cast pInstructionTextCast = pBaseText
set gActiveFunctionObj = me
mSetToolBtns (gInterfaceMgrObj, #STEAM, me)
set pActiveToolMenu = #None
mAddToActorlist (gActorListMgrObj, me)
set the visible of sprite pQTSprite = FALSE
set pCursorList = [21:#RETURN,22:#RETURN]
end
on mInitAerilon me
cursor 4
set pNavMovieCast = the number of cast "BAENAV1.MOV"
set pWhichNavMovie = #Aerilon
set pAcitiveAmbSnd = gactiveambsnd
set pOrderedHotSpotList = [#AEBody,#AEWing,#QTRect]
set pOrderedCursorList = [#Operate,#ZoomIn, #Standard]
set pHotSpotStatus = #empty
set pCurrSweetSpotList = pAESweetSpotList
set pRotateFrame = "rotateAE"
set pCurrExpText = the text of cast "AEOperateTxt"
set pRevealList = []
set pZoomList = ["playWing","wingZoom"]
mSetCursors (gUtilityObj, pCursorReturnList)
mAddToActorlist (gActorListMgrObj, me)
mplayIntroAudio (me)
set pSecondaryText =[the number of cast "AEWingTxt" ,the number of cast "AEWingTxt" ]
set pBaseText = the text of cast "AEInstructionTxt"
set the text of cast pInstructionTextCast = pBaseText
set gActiveFunctionObj = me
mSetToolBtns (gInterfaceMgrObj,#Aerilon, me)
set the visible of sprite pQTSprite = FALSE
set pActiveToolMenu = #None
set pCursorList = [21:#RETURN,22:#RETURN]
end
on mInitPhonautograph me
cursor 4
set pNavMovieCast = the number of cast "BPANAV1.MOV"
set pWhichNavMovie = #phonautograph
set pOrderedHotSpotList = [#mouthpiece,#hayPiece,#earSection,#QTRect]
set pOrderedCursorList = [#Operate, #ZoomIn, #Reveal, #Standard]
set pHotSpotStatus = #empty
set pCurrSweetSpotList = pPASweetSpotList
set pRotateFrame = "rotatePA"
set pCurrExpText = the text of cast "PAOperateTxt"
set pRevealList = ["playEar"]
set pZoomList = ["playHay"]
set pAcitiveAmbSnd = gactiveambsnd
mSetCursors (gUtilityObj, pCursorReturnList)
mAddToActorlist (gActorListMgrObj, me)
mplayIntroAudio (me)
set pSecondaryText =[the number of cast "PAHayTxt" ,the number of cast "PAEarTxt" ]
set pBaseText = the text of cast "PAInstructionTxt"
set the text of cast pInstructionTextCast = pBaseText
set gActiveFunctionObj = me
mSetToolBtns (gInterfaceMgrObj,#PhoneAuto, me)
set the visible of sprite pQTSprite = FALSE
set pActiveToolMenu = #None
set pCursorList = [21:#RETURN,22:#RETURN]
end
on mClearText me
set the text of cast pDescriptionTextCast = " "
set the text of cast pInstructionTextCast = " "
end
on mSetPosition me, startPoint
if (pWhichNavMovie = #FoilPhono) then set startPoint = "13,1"
else if (pWhichNavMovie = #Kinetograph) then set startPoint = "13,19"
else if (pWhichNavMovie = #SteamEngine) then set startPoint = "14,28"
else if ( pWhichNavMovie = #Aerilon) then set startPoint = "14,25"
else if ( pWhichNavMovie = #phonautograph ) then set startPoint = "15,5"
set pCurrImageV = value(item 1 of startPoint)
set pCurrImageH = value(item 2 of startPoint)
set pMyStatus = #dormant
set pImageNumber = ((pCurrImageV - 1) * pMaxImageH) + pCurrImageH
set frameNumber = pImageNumber * pQTFramesPerImage - 1
set the movieTime of sprite pQTSprite = frameNumber
set pLastFrameNum = frameNumber
set the visible of sprite pQTSprite = true
mPlaceMasks (me)
cursor - 1
end
on mMouseDownMsg me, whichSprite
sound stop pSndChannel
if (pHotSpotStatus = #QTRect) then
--mSetCursors (gUtilityObj, [14:#ExpMd])
mDragNavMov (me)
set the text of cast pInstructionTextCast = pBaseText
set gMouseDownExp = TRUE
else mCheckIfMask (me)
end
on mMouseUpMsg me
if (pMyStatus = #dragging) then
set pMyStatus = #dormant
set pCurrImageV = pDragImageV
set pCurrImageH = pDragImageH
mAddToActorList(gActorListMgrObj,gInterfaceMgrObj)
mPlaceMasks (me)
cursor 0
end if
end
on mPerform me
set currentMouseV = the mouseV
set currentMouseH = the mouseH
if (pMyStatus = #dragging) then mUpdateMovieFrame (me, currentMouseV, currentMouseH)
else
mCheckCursor (me, currentMouseV, currentMouseH)
set gMouseDownExp = FALSE
end if
end
on mUpdateMovieFrame me, currentMouseV, currentMouseH
mSetDirectionalCursor (me, currentMouseV, currentMouseH)
set deltaV = currentMouseV - pStartDragV
if (currentMouseH > pStartDragH) then set pStartDragH = pStartDragH + pFramesPerLineH
set deltaH = pStartDragH - currentMouseH
set deltaV = deltaV/pPixToFrames
set deltaH = deltaH/pPixToFrames
set pDragImageV = pCurrImageV + deltaV
set pDragImageH = pCurrImageH + deltaH
if (pDragImageV < 1) then set pDragImageV = 1
else if (pDragImageV > pMaxImageV) then set pDragImageV = pMaxImageV
set pDragImageH = pDragImageH mod pMaxImageH
if (pDragImageH < 1) then set pDragImageH = pMaxImageH
set pImageNumber = ((pDragImageV - 1) * pMaxImageH) + pDragImageH
set pLastFrameNum = pImageNumber * pQTFramesPerImage - 1
if (the castnum of sprite pQTSprite <> 0) then
set the movieTime of sprite pQTSprite = pLastFrameNum
end if
if (the mouseDown = FALSE) then mMouseUpMsg (me)
end
on mSetDirectionalCursor me, currentMouseV, currentMouseH
set deltaV = currentMouseV - pOldMouseV
set deltaH = currentMouseH - pOldMouseH
if (deltaV < -5) then set cursorV = 1
else if (deltaV > 5) then set cursorV = 3
else set cursorV = 2
if (deltaH < -5) then set cursorH = 1
else if (deltaH > 5) then set cursorH = 3
else set cursorH = 2
set cursorValue = ((cursorV - 1) * 3) + cursorH
-- mUnSetOneCursor (gUtilityObj, 14)
mSetIndexedCursor (gUtilityObj, #Rotating, cursorValue)
set pOldMouseV = currentMouseV
set pOldMouseH = currentMouseH
end
on mCheckCursor me, currentMouseV, currentMouseH
set mousePoint = point(currentMouseH,currentMouseV)
set onHotSpot = false
set pHotSpotStatus = #empty
repeat with hotSpotRect in pOrderedHotSpotRectList
if inside(mousePoint, hotSpotRect) then
set whichPosition = getPos(pOrderedHotSpotRectList,hotSpotRect)
if whichPosition = 0 then exit repeat
if whichPosition > count(pOrderedCursorList) then exit repeat
set whichCursor = getAt(pOrderedCursorList, whichPosition)
mSetGeneralCursor (gUtilityObj, whichCursor)
set pHotSpotStatus = getAt(pOrderedHotSpotList,whichPosition)
set onHotSpot = true
exit repeat
end if
end repeat
if onHotSpot = false then cursor 0
end
--
on mPlaceMasks me
if (pWhichNavMovie = #FoilPhono) then
set pHandleRect = value(line pImageNumber of pHandleRectList)
set pStylusRect = value(line pImageNumber of pStylusRectList)
set pOrderedHotSpotRectList = [pHandleRect, pStylusRect, pQTRect]
else if (pWhichNavMovie = #Kinetograph) then
set pReelRect = value(line pImageNumber of pReelRectList)
set pShutterRect = value(line pImageNumber of pShutterRectList)
set pViewRect = value(line pImageNumber of pViewRectList)
set pOrderedHotSpotRectList = [pShutterRect, pViewRect, pReelRect, pQTRect]
else if (pWhichNavMovie = #Aerilon) then
set pAEBodyRect = value(line pImageNumber of pAEBodyRectList)
set pAEWingRect = value(line pImageNumber of pAEWingRectList)
set pOrderedHotSpotRectList = [pAEBodyRect, pAEWingRect, pQTRect]
else if (pWhichNavMovie = #phonautograph) then
set pMouthRect = value(line pImageNumber of pMouthRectList)
set pHayRect = value(line pImageNumber of pHayRectList)
set pEarRect = value(line pImageNumber of pEarRectList)
set pOrderedHotSpotRectList = [pMouthRect, pHayRect, pEarRect, pQTRect]
else if (pWhichNavMovie = #SteamEngine) then
set pCylRect = value(line pImageNumber of pCylRectList)
set pCondRect = value(line pImageNumber of pCondRectList)
set pArmRect = value(line pImageNumber of pArmRectList)
set pOrderedHotSpotRectList = [pCylRect, pCondRect, pArmRect, pQTRect]
end if
end
on mDragNavMov me
mDeleteFromActorList (gActorListMgrObj, gInterfaceMgrObj)
set pMyStatus = #dragging
set pStartDragV = the mouseV
set pStartDragH = the mouseH
set pOldMouseV = pStartDragV
set pOldMouseH = pStartDragH
end
on mCheckIfMask me, whichSprite
cursor 4
if (pWhichNavMovie = #FoilPhono) then
if (pHotSpotStatus = #handle) then
set nearestSweetSpot = mDetermineWhichSweetSpot (me, pCurrSweetSpotList)
mSetTargetVariables (me, nearestSweetSpot)
go frame "rotateImage"
set the text of cast pInstructionTextCast = the text of cast "PGOperateTxt"
else if (pHotSpotStatus = #stylus) then
set the visible of sprite pQTsprite = FALSE
go frame "stylusZoom1"
set the text of cast pInstructionTextCast = the text of cast "PGStylusZ1Txt"
end if
else if (pWhichNavMovie = #Kinetograph) then
if (pHotSpotStatus = #reel) then
set nearestSweetSpot = mDetermineWhichSweetSpot (me, pCurrSweetSpotList)
mSetTargetVariables (me, nearestSweetSpot)
go frame "rotateKG"
set the text of cast pInstructionTextCast = the text of cast "KGOperateTxt"
else if (pHotSpotStatus = #shutter) then
set the visible of sprite pQTsprite = FALSE
go frame "shutterZoom"
set the text of cast pInstructionTextCast = the text of cast "KGShutterTxt"
else if (pHotSpotStatus = #viewer) then
set the visible of sprite pQTsprite = FALSE
set gEdisonFilmed = true
go frame "viewZoom"
set the text of cast pInstructionTextCast = the text of cast "KGViewText"
end if
else if (pWhichNavMovie = #Aerilon) then
if (pHotSpotStatus = #AEBody) then
set nearestSweetSpot = mDetermineWhichSweetSpot (me, pCurrSweetSpotList)
mSetTargetVariables (me, nearestSweetSpot)
go frame "rotateAE"
set the text of cast pInstructionTextCast = the text of cast "AEOperateTxt"
else if (pHotSpotStatus = #AEWing) then
set the visible of sprite pQTsprite = FALSE
go frame "playWing"
set the text of cast pInstructionTextCast = the text of cast "AEWingTxt"
end if
else if (pWhichNavMovie = #phonautograph) then
if (pHotSpotStatus = #mouthpiece) then
set nearestSweetSpot = mDetermineWhichSweetSpot (me, pCurrSweetSpotList)
mSetTargetVariables (me, nearestSweetSpot)
go frame "rotatePA"
set the text of cast pInstructionTextCast = the text of cast "PAOperateTxt"
else if (pHotSpotStatus = #hayPiece) then
set the visible of sprite pQTsprite = FALSE
go frame "playHay"
set the text of cast pInstructionTextCast = the text of cast "PAHayTxt"
else if (pHotSpotStatus = #earSection) then
set the visible of sprite pQTsprite = FALSE
go frame "playEar"
set the text of cast pInstructionTextCast = the text of cast "PAEarTxt"
end if
else if (pWhichNavMovie = #SteamEngine) then
if (pHotSpotStatus = #arm) then
set nearestSweetSpot = mDetermineWhichSweetSpot (me, pCurrSweetSpotList)
mSetTargetVariables (me, nearestSweetSpot)
go frame "rotateSE"
mSetCursors (gUtilityObj, [21:#return,22:#return,6:#operate])
set the text of cast pInstructionTextCast = the text of cast "SEOperateTxt"
else if (pHotSpotStatus = #cylinder) then
set the visible of sprite pQTsprite = FALSE
go frame "playCylinder"
set the text of cast pInstructionTextCast = the text of cast "SECylinderTxt"
else if (pHotSpotStatus = #condenser) then
set the visible of sprite pQTsprite = FALSE
go frame "playCondenser"
set the text of cast pInstructionTextCast = the text of cast "SECondenserTxt"
end if
end if
set pHotSpotStatus = #empty
end
on mDetermineWhichSweetSpot me, sweetSpotList
set shortestDistance = 1000 -- seed value
repeat with spotCounter = 1 to count(sweetSpotList)
set nextPoint = getPropAt(sweetSpotList,spotCounter)
set theDistance = abs(pImageNumber - getPropAt(sweetSpotList,spotCounter))
set theDistanceY = theDistance/pMaxImageH
set theDistanceX = theDistance - (pMaxImageH * theDistanceY)
set theDistance = theDistanceY + theDistanceX
if (theDistance < shortestDistance) then
set shortestDistance = theDistance
set shortestDistancePoint = nextPoint
set pWhichSpotNum = spotCounter
end if
end repeat
set nearestSweetSpot = getAProp(sweetSpotList, shortestDistancePoint)
return (nearestSweetSpot)
end
on mSetTargetVariables me, targetPoint
set pTargetVertical = value(item 1 of targetPoint)
set pTargetHorizontal = value(item 2 of targetPoint)
if (pTargetVertical < pCurrImageV) then set pVertStep = -1
else set pVertStep = 1
if (pTargetHorizontal < pCurrImageH) then set pHorStep = -1
else set pHorStep = 1
end
on mMoveQTImage me
if (pTargetVertical = pCurrImageV) AND (pTargetHorizontal = pCurrImageH) then
cursor 4
mDeleteFromActorlist (gActorListMgrObj, me)
set the visible of sprite pQTsprite = FALSE
if (pWhichNavMovie = #FoilPhono) then
if pLoadFoil then
go "LoadFoil"
set pLoadFoil = FALSE
else
go frame "playPhono"
mInitPlayPhono( me )
end if
else if (pWhichNavMovie = #Kinetograph) then
go frame "playKG"
mInitPlayKG me
else if (pWhichNavMovie = #Aerilon) then
go frame "playAE"
mInitPlayAE( me )
else if (pWhichNavMovie = #phonautograph) then
go frame "playPA"
mInitPlayPA (me)
else if (pWhichNavMovie = #SteamEngine) then
go frame "playSE"
mInitPlaySE(me)
end if
cursor -1
else
if (pTargetVertical <> pCurrImageV) then set pCurrImageV = pCurrImageV + pVertStep
if (pTargetHorizontal <> pCurrImageH) then set pCurrImageH = pCurrImageH + pHorStep
set pImageNumber = ((pCurrImageV - 1) * pMaxImageH) + pCurrImageH
set pLastFrameNum = pImageNumber * pQTFramesPerImage - 1
set the movieTime of sprite pQTSprite = pLastFrameNum
go the frame
end if
end
on mRotate me, whatrect
set pActiveToolMenu = #rotate
set directionCordinates = getaProp(pRotateDirectionList,whatrect)
set stepH = item 1 of directionCordinates
set stepV = item 2 of directionCordinates
repeat while (the mouseDown)
set pCurrImageV = pCurrImageV + stepV
if (pCurrImageV < 1) then set pCurrImageV = 1
else if (pCurrImageV > pMaxImageV) then set pCurrImageV = pMaxImageV
set pCurrImageH = pCurrImageH + stepH
if (pCurrImageH < 1) then set pCurrImageH = pMaxImageH
else if (pCurrImageH > pMaxImageH) then set pCurrImageH = 1
set pImageNumber = ((pCurrImageV - 1) * pMaxImageH) + pCurrImageH
set pLastFrameNum = pImageNumber * pQTFramesPerImage - 1
set the movieTime of sprite pQTSprite = pLastFrameNum
updateStage
end repeat
if (pActiveToolMenu <> #Load) then mClearToolHilite (gInterfaceMgrObj)
set pCurrImageV = integer(pCurrImageV)
set pCurrImageH = integer(pCurrImageH)
end
on mOperate me, whichSpot
mUnSetOneCursor (gUtilityObj, 16)
set pActiveToolMenu = #operate
if (whichSpot <= count(pCurrSweetSpotList)) then
if (soundBusy (pSndChannel)) then sound stop pSndChannel
set pWhichSpotNum = whichSpot
set nearestSweetSpot = getAt(pCurrSweetSpotList, pWhichSpotNum)
mSetTargetVariables (me, nearestSweetSpot)
set pBaseQTlocV = the locv of sprite pQTSprite
set the locv of sprite pQTSprite = -1000
sound stop 1
updatestage
go frame pRotateFrame
set the text of cast pInstructionTextCast = pCurrExpText
end if
end
--
on mReveal me, whichReveal
cursor 4
mUnSetOneCursor (gUtilityObj, 16)
set pActiveToolMenu = #reveal
set the movierate of sprite pQTplaySprite = 0
set the locv of sprite pQTplaySprite = -1000
puppetsprite pQTplaySprite, false
sound stop 1
updatestage
if (whichReveal <= count(pRevealList)) then
set revealFrame = getAt(pRevealList, whichReveal)
set the visible of sprite pQTSprite = FALSE
go frame revealFrame
end if
mClearToolHilite (gInterfaceMgrObj)
cursor -1
end
on mZoom me, whichZoom
puppetsprite pQTplaySprite, false
set the locv of sprite pQTplaySprite = -1000
updatestage
cursor 4
mUnSetOneCursor (gUtilityObj, 16)
set pActiveToolMenu = #zoom
sound stop 1
set whatZoomFrame = getat(pZoomList, whichZoom)
set the visible of sprite pQTsprite = FALSE
go whatZoomFrame
set the text of cast pInstructionTextCast = the text of cast getat(pSecondaryText,whichZoom)
mClearToolHilite (gInterfaceMgrObj)
cursor -1
end
on mLoad me, whichSnd
cursor 4
puppetsprite pQTplaySprite, FALSE
mUnSetOneCursor (gUtilityObj, 16)
set pActiveToolMenu = #load
set pPGSnd = getAt(pPGSndList,whichSnd)
set gactiveambsnd = 0
sound stop 1
sound stop 2
updatestage
set startline = (whichSnd -1) * 8 + 1
set the text of cast pInstructionTextCast = line startline to (startline + 8) of pTinFoilLoadText
mSetTargetVariables (me, "13,1")
set pWhichSpotNum = 2
go "rotateImage"
set pLoadFoil = TRUE
cursor -1
end
on mStartExplorable me
set the movieTime of sprite pQTSprite = 0
set the movieRate of sprite pQTSprite = 1
end
on mInitPlayPhono me
puppetSprite pQTplaySprite, true
set the castNum of sprite pQTplaySprite = pPhonoAnimFlag + pWhichSpotNum
set the locH of sprite pQTplaySprite = 240
set the locV of sprite pQTplaySprite = 260
sound stop 1
updatestage
set the movierate of sprite pQTplaySprite = 1
--set the volume of sprite pQTplaysprite = 255
end
on mStartAudio me
sound stop 2
sound stop 1
updatestage
set whatsnd = gSndPath & pPGSnd
sound playfile 1, whatsnd
end
on mInitPlayKG me
puppetSprite pQTplaySprite, true
set the castNum of sprite pQTplaySprite = pKGAnimFlag + pWhichSpotNum
set the locH of sprite pQTplaySprite = 240
set the locV of sprite pQTplaySprite = 260
sound stop 1
updatestage
set the movierate of sprite pQTplaySprite = 1
set the volume of sprite pQTplaysprite = 255
end
on mInitPlayAE me
if pWhichSpotNum = pAEFlyRightAnim then mPrepForZoom2 (me)
puppetSprite pQTplaySprite, true
set the castNum of sprite pQTplaySprite = pAEAnimFlag + pWhichSpotNum
set the locH of sprite pQTplaySprite = 240
set the locV of sprite pQTplaySprite = 260
sound stop 1
updatestage
set the movierate of sprite pQTplaySprite = 1
set the volume of sprite pQTplaysprite = 255
end
on mInitPlayPA me
puppetSprite pQTplaySprite, true
set the castNum of sprite pQTplaySprite = pPAAnimFlag + pWhichSpotNum
set movieLoc = getAt(pPAPlayMovieLocList,pWhichSpotNum)
set the locH of sprite pQTplaySprite = value(item 1 of movieLoc)
set the locV of sprite pQTplaySprite = value(item 2 of movieLoc)
sound stop 1
updatestage
set the movierate of sprite pQTplaySprite = 1
set the volume of sprite pQTplaysprite = 255
end
on mInitPlaySE me
puppetSprite pQTplaySprite, true
set the castNum of sprite pQTplaySprite = pSEAnimFlag + pWhichSpotNum
set the locH of sprite pQTplaySprite = 240
set the locV of sprite pQTplaySprite = 260
sound stop 1
updatestage
set the movierate of sprite pQTplaySprite = 1
set the volume of sprite pQTplaysprite = 255
end
on mPrepForZoom2 me
set cursorList = [:]
setaprop(cursorList,pBkgdSprite,#ZoomIn)
mSetCursors (gUtilityObj, cursorList)
end
on mCheckForZoom2 me
if pWhichSpotNum = pAEFlyRightAnim then
puppetSprite pQTSprite, false
go frame "wingZoom"
sound stop 1
set the movierate of sprite pQTplaySprite = 1
else mCleanUpAfterPlaying me
end
on mPlayQT me
if (the movieRate of sprite pQTplaySprite = 1) then go the frame
else
set gActiveAmbSnd = getat( ["EAMBIENT.AIF","BAMBIENT.AIF","WAMBIENT.AIF","GALLERY.AIF"], gInventorIndexNum )
set the locv of sprite pQTplaySprite = -1000
end if
end
on mCleanUpAfterPlaying me
cursor 4
set gactiveambsnd = pAcitiveAmbSnd
puppetSprite pQTplaySprite, false
set the locv of sprite pQTplaySprite = -1000
sound stop 1
updatestage
set the visible of sprite pQTsprite = TRUE
set gactiveambsnd = pAcitiveAmbSnd
if (pWhichNavMovie = #FoilPhono) then go frame "FoilBasePos"
else if (pWhichNavMovie = #Kinetograph) then go frame "KGbase"
else if (pWhichNavMovie = #SteamEngine) then go frame "SEbase"
else if ( pWhichNavMovie = #Aerilon) then go frame "AEbase"
else if (pWhichNavMovie = #phonautograph) then go frame "PAbase"
mPlaceMasks (me)
mUnSetOneCursor (gUtilityObj, 16)
mUnSetOneCursor (gUtilityObj, 6)
mResetCursors (me)
if (pActiveToolMenu <> #Load) then mClearToolHilite (gInterfaceMgrObj)
mAddToActorlist (gActorListMgrObj,me)
end mCleanUpAfterPlaying
on mResetCursors me
cursor 200
cursor -1
mUnSetOneCursor (gUtilityObj, pQTSprite)
updateStage
end
on mInitSTYZoom1 me
set pAcitiveAmbSnd = gactiveambsnd
set gactiveambsnd = 0
sound stop 1
updatestage
set cursorList = [:]
setaprop(cursorList,pBkgdSprite,#ZoomIn)
mUnSetOneCursor (gUtilityObj, 18)
mSetCursors (gUtilityObj, cursorList)
updatestage
put "pQTplaySprite " & pQTplaySprite
set the movierate of sprite pQTplaySprite = 1
mStartAudio ( me )
end
on mInitPHZoom2 me
set cursorList = [:]
setaprop(cursorList,16,#ZoomOut)
set pAcitiveAmbSnd = gactiveambsnd
set gactiveambsnd = 0
sound stop 1
sound stop 2
updatestage
if (pWhichNavMovie = #FoilPhono) then
setaprop(cursorList,18,#operate)
mSetCursors (gUtilityObj, cursorList)
set the text of cast pInstructionTextCast = the text of cast "PGStylusZ2Txt"
else if (pWhichNavMovie = #Kinetograph) then
mSetCursors (gUtilityObj, cursorList)
else if (pWhichNavMovie = #Aerilon) then
mSetCursors (gUtilityObj, cursorList)
set the text of cast pInstructionTextCast = the text of cast "AEZoomTxt"
end if
set the movierate of sprite pQTplaySprite = 1
end
on mInitAEZoom1 me
set pAcitiveAmbSnd = gactiveambsnd
set gactiveambsnd = 0
sound stop 1
updatestage
set cursorList = [:]
setaprop(cursorList,pQTSprite,#ZoomOut)
mSetCursors (gUtilityObj, cursorList)
set the movierate of sprite pQTplaySprite = 1
end
on mplayIntroAudio me
if (pWhichNavMovie = #FoilPhono) then set audioFile = gSndPath & "EPHINTR.AIF"
else if (pWhichNavMovie = #Kinetograph) then set audioFile = gSndPath & "EKGINTR.AIF"
else if (pWhichNavMovie = #SteamEngine) then set audioFile = gSndPath & "WSEINTR.AIF"
else if ( pWhichNavMovie = #Aerilon) then set audioFile = gSndPath & "BAEINTR.AIF"
else if ( pWhichNavMovie = #phonautograph ) then set audioFile = gSndPath & "BPAINTR.AIF"
sound playFile pSndChannel, audioFile
end
on mloopSnd me
if (soundBusy (pSndChannel)) then go the frame
end