home *** CD-ROM | disk | FTP | other *** search
- global gTheName, gTheNewWinht, gTheNewWinwd, gtheHeight, gTheWidth, gAssetPath, gPDL, gWinListNum, gWindowNum1, gMyWinTracker, gtheLockList, gtheSearchWord, gtheWord, gImageList, gActiveWin, gWinType, gNewCaption, gPath, gPicWinNum, gComputerTypeK, gWinTypeList, gModeState, gLastWinLeft, gLastWinTop, gWinOffSet, gWinLocRootT, gWinLocRootL, gWinLocCounter
-
- on birth me
- return me
- end
-
- on mFixMe me
- set LtheHeight to the height of cast "BlankPict"
- set LtheWidth to the width of cast "BlankPict"
- if not (the puppet of sprite 2) then
- puppetSprite(2, 1)
- end if
- set the locH of sprite 2 to 7 + (LtheWidth / 2)
- set the locV of sprite 2 to 19 + (LtheHeight / 2)
- updateStage()
- end
-
- on mStartUp me
- setAt(gImageList, gWinListNum, gTheName)
- setAt(gWinTypeList, gWinListNum, gModeState)
- setAt(gMyWinTracker, gWinListNum, 1)
- if not (the puppet of sprite 2) then
- puppetSprite(2, 1)
- end if
- set the text of cast "caption" to string(gNewCaption)
- go(2)
- mMoveTextField(me)
- set vTrekCursor to the number of cast "trekcursFG"
- cursor([vTrekCursor, vTrekCursor + 1])
- end
-
- on mSetBlankCast me
- set the fileName of cast "BlankPict" to the pathName & "BLMPC\" & "BlankR.pic"
- end
-
- on mDoCloseWindow me
- set gPicWinNum to chars(the movieName, 1, 2)
- if char 2 of string(gPicWinNum) = "P" then
- set gPicWinNum to char 1 of string(gPicWinNum)
- else
- set gPicWinNum to char 1 to 2 of string(gPicWinNum)
- end if
- set gActiveWin to the pathName & the movieName
- tell the stage
- hRestorePicon(1)
- end tell
- set vWinToClose to getaProp(gMyWinList, gPicWinNum)
- if the shiftDown then
- set gLastWinLeft to getAt(the rect of window gActiveWin, 1)
- set gLastWinTop to getAt(the rect of window gActiveWin, 2)
- set gWinLocRootL to getAt(the rect of window gActiveWin, 1)
- set gWinLocRootT to getAt(the rect of window gActiveWin, 2)
- set gWinLocCounter to 1
- end if
- setAt(gImageList, integer(gPicWinNum), EMPTY)
- setAt(gWinTypeList, integer(gPicWinNum), #CLOSED)
- setAt(gMyWinList, integer(gPicWinNum), EMPTY)
- setAt(gMyWinTracker, integer(gPicWinNum), 0)
- setAt(gtheLockList, integer(gPicWinNum), 0)
- forget(window vWinToClose)
- end
-
- on mKeyVoiceClose me
- tell the stage
- hRestorePicon(1)
- end tell
- set vWinToClose to getaProp(gMyWinList, gPicWinNum)
- if the shiftDown then
- set gLastWinLeft to getAt(the rect of window gActiveWin, 1)
- set gLastWinTop to getAt(the rect of window gActiveWin, 2)
- set gWinLocRootL to getAt(the rect of window gActiveWin, 1)
- set gWinLocRootT to getAt(the rect of window gActiveWin, 2)
- set gWinLocCounter to 1
- end if
- setAt(gImageList, integer(gPicWinNum), EMPTY)
- setAt(gWinTypeList, integer(gPicWinNum), #CLOSED)
- setAt(gMyWinList, integer(gPicWinNum), EMPTY)
- setAt(gMyWinTracker, integer(gPicWinNum), 0)
- setAt(gtheLockList, integer(gPicWinNum), 0)
- forget(window vWinToClose)
- end
-
- on mDisplayPict me
- mGetthePICT(me)
- mSizetheWindow(me)
- if not (the puppet of sprite 2) then
- puppetSprite(2, 1)
- end if
- set the locH of sprite 2 to 7 + (gTheWidth / 2)
- set the locV of sprite 2 to 19 + (gtheHeight / 2)
- updateStage()
- end
-
- on mGetthePICT me
- set LFirstChar to char 1 of string(gTheName)
- set gPath to gAssetPath
- set the fileName of cast "BlankPict" to gPath & LFirstChar & gPDL & gTheName & "R.PIC"
- end
-
- on mMoveTextField me
- if not (the puppet of sprite 4) then
- puppetSprite(4, 1)
- end if
- set the locH of sprite 4 to the right of sprite 2 - 234
- updateStage()
- set x to the movieName
- set vNum to value(char 1 of x)
- if char 2 of x = "0" then
- set vNum to 10
- end if
- if getAt(gtheLockList, vNum) = 1 then
- mForceLockMe(me)
- end if
- end
-
- on mSizetheWindow me
- set gtheHeight to the height of cast "BlankPict"
- set gTheWidth to the width of cast "BlankPict"
- set the regPoint of cast "BlankPict" to point(gTheWidth / 2, gtheHeight / 2)
- set gTheNewWinht to gtheHeight + 19
- set gTheNewWinwd to gTheWidth + 7
- end
-
- on mForceLockMe me
- puppetSprite(7, 1)
- set the castNum of sprite 7 to the number of cast "Lock" + 1
- updateStage()
- setAt(gtheLockList, integer(gPicWinNum), 1)
- end
-
- on mLockMe me
- if gActiveWin <> (the pathName & the movieName) then
- exit
- end if
- if getaProp(gtheLockList, integer(gPicWinNum)) = 0 then
- puppetSprite(7, 1)
- set the castNum of sprite 7 to the number of cast (the castNum of sprite 7 + 1)
- updateStage()
- setAt(gtheLockList, integer(gPicWinNum), 1)
- else
- puppetSprite(7, 0)
- updateStage()
- setAt(gtheLockList, integer(gPicWinNum), 0)
- end if
- end
-
- on mGetWord me
- global gtheWord
- set x to the mouseCast
- set y to the mouseWord
- if (x > 0) and (y > 0) then
- set gtheWord to word y of field x
- tell the stage
- hFindCaptionWord()
- end tell
- end if
- end
-
- on mDoActivateWindow me
- set gPicWinNum to chars(the movieName, 1, 2)
- if char 2 of string(gPicWinNum) = "P" then
- set gPicWinNum to char 1 of string(gPicWinNum)
- else
- set gPicWinNum to char 1 to 2 of string(gPicWinNum)
- end if
- set gActiveWin to the pathName & the movieName
- if the shiftDown then
- set gLastWinLeft to getAt(the rect of window gActiveWin, 1) + gWinOffSet
- set gLastWinTop to getAt(the rect of window gActiveWin, 2) + gWinOffSet
- set gWinLocRootL to getAt(the rect of window gActiveWin, 1)
- set gWinLocRootT to getAt(the rect of window gActiveWin, 2)
- set gWinLocCounter to 1
- end if
- end
-