home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global gGoingToTopic
- if gGoingToTopic <> 1 then
- go(the frame)
- else
- set gGoingToTopic to 0
- end if
- end
-
- on enterFrame
- global gGoingToTopic
- puppetSound(0)
- setCursors()
- puppetSprite(2, 1)
- setPuppets(1)
- set gGoingToTopic to 0
- checkHilite()
- end
-
- on checkHilite
- global gTopicList, gButtonLast, gButtonBase
- set vCast to the mouseCast
- if vCast = -1 then
- set vText to field "currentTitle"
- if vText <> EMPTY then
- put EMPTY into field "currentTitle"
- end if
- exit
- end if
- if (vCast > gButtonBase) and (vCast < gButtonLast) then
- set vLine to vCast - gButtonBase
- set vTitle to line vLine of field "titles"
- set vTextNow to field "currentTitle"
- if vTextNow <> vTitle then
- put vTitle into field "currentTitle"
- end if
- else
- set vText to field "currentTitle"
- if vText <> EMPTY then
- put EMPTY into field "currentTitle"
- end if
- end if
- updateStage()
- end
-
- on mouseDown
- global gButtonBase, gTitleList, gSpriteBase, gGoingToTopic
- set vCastNo to the mouseCast
- set vName to the name of cast vCastNo
- if (vName = "quitUp") or (vName = "currentTitle") or (vName = "MLOGO") or (vName = "mainBg") then
- exit
- end if
- set vDisp to vCastNo - gButtonBase
- set vSpriteNo to vDisp + gSpriteBase
- set the castNum of sprite vSpriteNo to gButtonBase
- updateStage()
- set vOld to 0
- repeat while the mouseDown
- set vMcast to the mouseCast
- if vMcast = gButtonBase then
- nothing()
- else
- if vMcast = vCastNo then
- set the castNum of sprite vSpriteNo to gButtonBase
- updateStage()
- else
- set the castNum of sprite vSpriteNo to vCastNo
- updateStage()
- end if
- end if
- set vOld to vMcast
- end repeat
- set the castNum of sprite vSpriteNo to vCastNo
- updateStage()
- set vReleaseObj to the mouseCast
- if vReleaseObj = vCastNo then
- setDemo(vName, vDisp)
- set gGoingToTopic to 1
- set vGoto to vName & "main"
- setPuppets(0)
- go(vGoto)
- end if
- end
-
- on setDemo fTopic, fOffset
- global gCurrentTopic, gTopicOffset, gTopicState
- set gTopicState to "main"
- set gCurrentTopic to fTopic
- set gTopicOffset to fOffset
- end
-
- on setCursors
- global gHandCursor
- repeat with i = 11 to 23
- set the cursor of sprite i to gHandCursor
- end repeat
- set the cursor of sprite 3 to gHandCursor
- end
-