home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global WasIN_MM040
- set WasIN_MM040 to 1
- initLesson()
- cursor([402, 403])
- Set_WindowSp(0)
- Set_ScreenSubject("00")
- Set_CurrentTool("00")
- end
-
- on stopMovie
- sound stop 2
- setEmptyCursor()
- end
-
- on TheinitCursor
- initCursorCastNum()
- initCursorList(1)
- set CursorCastNum to getCursor(2)
- cursor([CursorCastNum, CursorCastNum + 1])
- end
-
- on InitMenu
- set_NumOfAnswers(8)
- Set_AnsSprite(10)
- set_menuSprite(21)
- Set_PressedLast(EMPTY)
- InitBtns()
- setRollName(EMPTY)
- Set_ToolAnsNumbers(field "ToolAnsNumbers")
- end
-
- on LoadMenu
- set theMenu to get_PressedLast()
- set startSp to get_menuSprite()
- if theMenu = 1 then
- repeat with i = startSp to startSp + 5
- UpdateCursors(i, 4)
- end repeat
- repeat with i = startSp + 6 to startSp + 7
- UpdateCursors(i, 3)
- end repeat
- else
- if theMenu = 2 then
- repeat with i = startSp to startSp + 5
- UpdateCursors(i, 4)
- end repeat
- repeat with i = startSp + 6 to startSp + 7
- UpdateCursors(i, 3)
- end repeat
- else
- if theMenu = 3 then
- repeat with i = startSp to startSp + 3
- UpdateCursors(i, 4)
- end repeat
- repeat with i = startSp + 4 to startSp + 5
- UpdateCursors(i, 3)
- end repeat
- else
- if theMenu = 4 then
- repeat with i = startSp to startSp + 3
- UpdateCursors(i, 4)
- end repeat
- repeat with i = startSp + 4 to startSp + 5
- UpdateCursors(i, 3)
- end repeat
- else
- if theMenu = 5 then
- repeat with i = startSp to startSp + 1
- UpdateCursors(i, 4)
- end repeat
- repeat with i = startSp + 2 to startSp + 3
- UpdateCursors(i, 3)
- end repeat
- else
- if theMenu = 6 then
- repeat with i = startSp to startSp + 7
- UpdateCursors(i, 4)
- end repeat
- repeat with i = startSp + 8 to startSp + 9
- UpdateCursors(i, 3)
- end repeat
- else
- if theMenu = 7 then
- repeat with i = startSp to startSp + 1
- UpdateCursors(i, 4)
- end repeat
- repeat with i = startSp + 2 to startSp + 3
- UpdateCursors(i, 3)
- end repeat
- else
- if theMenu = 8 then
- repeat with i = startSp to startSp + 1
- UpdateCursors(i, 4)
- end repeat
- repeat with i = startSp + 2 to startSp + 2
- UpdateCursors(i, 3)
- end repeat
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- set NumOfItems to line theMenu of Get_ToolAnsNumbers()
- repeat with i = 21 to NumOfItems + 21
- puppetSprite(i, 1)
- end repeat
- end
-
- on menuItem theItem
- global ReturnToMenu
- set theTool to get_PressedLast()
- set startSp to get_menuSprite()
- set the castNum of sprite (startSp + theItem - 1) to the number of cast (theTool & "-DOWN" & theItem)
- updateStage()
- set theGO to line theItem of field ("pointers-T" & theTool)
- if item 1 of theGO = "go" then
- set ReturnToMenu to "SECTION"
- Set_CurrentTool(item 2 of theGO)
- set movieName to item 3 of theGO
- set toolNum to Get_CurrentTool()
- set theVec to EMPTY
- do("put" && "get_ScreensTool" & toolNum & "()" && "into theVec")
- Set_CurrentSnakeScreens(theVec)
- do("put" && "Get_WasInPathTool" & toolNum & "()" && "into theVec")
- repeat with i = 1 to the number of items in theVec
- put value(item i of theVec) into item i of theVec
- end repeat
- Set_SeenINPath(theVec)
- go("Init" & Get_ScreenSubject(), movieName)
- else
- if item 1 of theGO = "tip" then
- Set_NumOfTips(value(item 2 of theGO))
- Set_WDmode("TIP")
- DisposeMenu()
- Set_WindowSp(1)
- Set_pageNum(1)
- LoadTip()
- go("TIP")
- else
- if item 1 of theGO = "did" then
- Set_NumOfDids(value(item 2 of theGO))
- Set_WDmode("DID")
- DisposeMenu()
- Set_WindowSp(1)
- Set_pageNum(1)
- LoadDID()
- go("DID")
- end if
- end if
- end if
- end
-
- on DisposeMenu
- set the castNum of sprite (Get_AnsSprite() + get_PressedLast() - 1) to the number of cast ("ANS" & get_PressedLast())
- set theMenu to get_PressedLast()
- set NumOfItems to line theMenu of Get_ToolAnsNumbers()
- repeat with i = 21 to NumOfItems + 21
- UpdateCursors(i, 0)
- puppetSprite(i, 0)
- end repeat
- end
-
- on InitBtns
- set numOfBtn to Get_NumOfAnswers()
- repeat with i = 1 to numOfBtn
- set the puppet of sprite (Get_AnsSprite() + i - 1) to 1
- end repeat
- end
-
- on checkScreenStatus
- CheckRollOver()
- go(the frame)
- end
-
- on PressBtn theBtn
- if get_PressedLast() <> EMPTY then
- DisposeMenu()
- end if
- Set_PressedLast(theBtn)
- switchButt(Get_AnsSprite() + theBtn - 1, "down" & theBtn, "HandleBtn" && theBtn)
- end
-
- on HandleBtn theBtn
- if theBtn = 1 then
- Set_CurrentTool("01")
- else
- if theBtn = 2 then
- Set_CurrentTool("02")
- else
- if theBtn = 3 then
- Set_CurrentTool("06")
- else
- if theBtn = 4 then
- Set_CurrentTool("03")
- else
- if theBtn = 5 then
- Set_CurrentTool("04")
- else
- if theBtn = 6 then
- Set_CurrentTool("05")
- else
- if theBtn = 7 then
- Set_CurrentTool("07")
- else
- if theBtn = 8 then
- Set_CurrentTool("08")
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- go("menu" & theBtn)
- end
-
- on LoadTip
- set the castNum of sprite 34 to the number of cast (get_PressedLast() & "_tip" & get_PageNum())
- if get_PageNum() < Get_NumOfTips() then
- set the castNum of sprite 36 to the number of cast "NEXT"
- UpdateCursors(36, 3)
- else
- set the castNum of sprite 36 to the number of cast "NEXT_F"
- UpdateCursors(36, 1)
- end if
- if get_PageNum() > 1 then
- set the castNum of sprite 35 to the number of cast "BACK"
- UpdateCursors(35, 3)
- else
- set the castNum of sprite 35 to the number of cast "BACK_F"
- UpdateCursors(35, 1)
- end if
- end
-
- on LoadDID
- set the castNum of sprite 34 to the number of cast (get_PressedLast() & "_did" & get_PageNum())
- if get_PageNum() < Get_NumOfDIDs() then
- set the castNum of sprite 36 to the number of cast "NEXT"
- UpdateCursors(36, 3)
- else
- set the castNum of sprite 36 to the number of cast "NEXT_F"
- UpdateCursors(36, 1)
- end if
- if get_PageNum() > 1 then
- set the castNum of sprite 35 to the number of cast "BACK"
- UpdateCursors(35, 3)
- else
- set the castNum of sprite 35 to the number of cast "BACK_F"
- UpdateCursors(35, 1)
- end if
- end
-
- on handleNextpage
- Set_pageNum(get_PageNum() + 1)
- if get_WDmode() = "TIP" then
- LoadTip()
- else
- LoadDID()
- end if
- updateStage()
- end
-
- on handleBackpage
- Set_pageNum(get_PageNum() - 1)
- if get_WDmode() = "TIP" then
- LoadTip()
- else
- LoadDID()
- end if
- updateStage()
- end
-
- on InitDID
- initCursorList(2)
- LoadDID()
- end
-
- on INITTIP
- initCursorList(2)
- LoadTip()
- end
-
- on handleExit
- set the puppet of sprite 33 to 0
- Set_WindowSp(0)
- repeat with i = 37 to 40
- UpdateCursors(i, 0)
- end repeat
- UpdateCursors(32, 0)
- UpdateCursors(33, 0)
- initCursorList(1)
- go("init")
- end
-
- on Set_ToolAnsNumbers theNum
- global ToolAnsNumbers
- set ToolAnsNumbers to theNum
- end
-
- on Get_ToolAnsNumbers theNum
- global ToolAnsNumbers
- return ToolAnsNumbers
- end
-
- on set_menuSprite theNum
- global menuSprite
- set menuSprite to theNum
- end
-
- on get_menuSprite theNum
- global menuSprite
- return menuSprite
- end
-
- on Set_NumOfTips theNum
- global NumOfTips
- set NumOfTips to theNum
- end
-
- on Get_NumOfTips theNum
- global NumOfTips
- return NumOfTips
- end
-
- on Set_NumOfDids theNum
- global NumOfDIDs
- set NumOfDIDs to theNum
- end
-
- on Get_NumOfDIDs theNum
- global NumOfDIDs
- return NumOfDIDs
- end
-
- on Set_pageNum theNum
- global PageNum
- set PageNum to theNum
- end
-
- on get_PageNum theNum
- global PageNum
- return PageNum
- end
-
- on Set_WDmode theNum
- global WDmode
- set WDmode to theNum
- end
-
- on get_WDmode theNum
- global WDmode
- return WDmode
- end
-
- on Set_CDcounter theNum
- global CDcounter
- set CDcounter to theNum
- end
-
- on Add_CDcounter theNum
- global CDcounter
- set CDcounter to theNum
- end
-
- on Get_CDcounter
- global CDcounter
- return CDcounter
- end
-
- on Set_AnsSprite theNum
- global AnsSprite
- set AnsSprite to theNum
- end
-
- on Get_AnsSprite
- global AnsSprite
- return AnsSprite
- end
-
- on set_NumOfAnswers theNum
- global NumOfAnswers
- set NumOfAnswers to theNum
- end
-
- on Get_NumOfAnswers
- global NumOfAnswers
- return NumOfAnswers
- end
-
- on Set_PressedLast theNum
- global PressedLast
- set PressedLast to theNum
- end
-
- on get_PressedLast
- global PressedLast
- return PressedLast
- end
-
- on Set_ScreenSubject theNum
- global ScreenSubject
- set ScreenSubject to theNum
- end
-
- on Get_ScreenSubject
- global ScreenSubject
- return ScreenSubject
- end
-
- on Set_ScreensTool01 theMode
- global ScreensTool01
- set ScreensTool01 to theMode
- end
-
- on Get_ScreensTool01
- global ScreensTool01
- return ScreensTool01
- end
-
- on Set_ScreensTool02 theMode
- global ScreensTool02
- set ScreensTool02 to theMode
- end
-
- on Get_ScreensTool02
- global ScreensTool02
- return ScreensTool02
- end
-
- on Set_ScreensTool03 theMode
- global ScreensTool03
- set ScreensTool03 to theMode
- end
-
- on Get_ScreensTool03
- global ScreensTool03
- return ScreensTool03
- end
-
- on Set_ScreensTool04 theMode
- global ScreensTool04
- set ScreensTool04 to theMode
- end
-
- on Get_ScreensTool04
- global ScreensTool04
- return ScreensTool04
- end
-
- on Set_ScreensTool05 theMode
- global ScreensTool05
- set ScreensTool05 to theMode
- end
-
- on Get_ScreensTool05
- global ScreensTool05
- return ScreensTool05
- end
-
- on Set_ScreensTool06 theMode
- global ScreensTool06
- set ScreensTool06 to theMode
- end
-
- on Get_ScreensTool06
- global ScreensTool06
- return ScreensTool06
- end
-
- on Set_ScreensTool07 theMode
- global ScreensTool07
- set ScreensTool07 to theMode
- end
-
- on Get_ScreensTool07
- global ScreensTool07
- return ScreensTool07
- end
-
- on Set_ScreensTool08 theMode
- global ScreensTool08
- set ScreensTool08 to theMode
- end
-
- on Get_ScreensTool08
- global ScreensTool08
- return ScreensTool08
- end
-
- on Set_ScreensTool09 theMode
- global ScreensTool09
- set ScreensTool09 to theMode
- end
-
- on Get_ScreensTool09
- global ScreensTool09
- return ScreensTool09
- end
-
- on Set_ScreensTool10 theMode
- global ScreensTool10
- set ScreensTool10 to theMode
- end
-
- on Get_ScreensTool10
- global ScreensTool10
- return ScreensTool10
- end
-
- on Set_ScreensTool11 theMode
- global ScreensTool11
- set ScreensTool11 to theMode
- end
-
- on Get_ScreensTool11
- global ScreensTool11
- return ScreensTool11
- end
-
- on Set_ScreensTool12 theMode
- global ScreensTool12
- set ScreensTool12 to theMode
- end
-
- on Get_ScreensTool12
- global ScreensTool12
- return ScreensTool12
- end
-
- on Set_ScreensTool13 theMode
- global ScreensTool13
- set ScreensTool13 to theMode
- end
-
- on Get_ScreensTool13
- global ScreensTool13
- return ScreensTool13
- end
-
- on Set_WasInPathTool01 theMode
- global WasInPathTool01
- set WasInPathTool01 to theMode
- end
-
- on Get_WasInPathTool01
- global WasInPathTool01
- return WasInPathTool01
- end
-
- on Set_WasInPathTool02 theMode
- global WasInPathTool02
- set WasInPathTool02 to theMode
- end
-
- on Get_WasInPathTool02
- global WasInPathTool02
- return WasInPathTool02
- end
-
- on Set_WasInPathTool03 theMode
- global WasInPathTool03
- set WasInPathTool03 to theMode
- end
-
- on Get_WasInPathTool03
- global WasInPathTool03
- return WasInPathTool03
- end
-
- on Set_WasInPathTool04 theMode
- global WasInPathTool04
- set WasInPathTool04 to theMode
- end
-
- on Get_WasInPathTool04
- global WasInPathTool04
- return WasInPathTool04
- end
-
- on Set_WasInPathTool05 theMode
- global WasInPathTool05
- set WasInPathTool05 to theMode
- end
-
- on Get_WasInPathTool05
- global WasInPathTool05
- return WasInPathTool05
- end
-
- on Set_WasInPathTool06 theMode
- global WasInPathTool06
- set WasInPathTool06 to theMode
- end
-
- on Get_WasInPathTool06
- global WasInPathTool06
- return WasInPathTool06
- end
-
- on Set_WasInPathTool07 theMode
- global WasInPathTool07
- set WasInPathTool07 to Get_SeenINPath()
- end
-
- on Get_WasInPathTool07
- global WasInPathTool07
- return WasInPathTool07
- end
-
- on Set_WasInPathTool08 theMode
- global WasInPathTool08
- set WasInPathTool08 to Get_SeenINPath()
- end
-
- on Get_WasInPathTool08
- global WasInPathTool08
- return WasInPathTool08
- end
-
- on Set_WasInPathTool09 theMode
- global WasInPathTool09
- set WasInPathTool09 to Get_SeenINPath()
- end
-
- on Get_WasInPathTool09
- global WasInPathTool09
- return WasInPathTool09
- end
-
- on Set_WasInPathTool10 theMode
- global WasInPathTool10
- set WasInPathTool10 to Get_SeenINPath()
- end
-
- on Get_WasInPathTool10
- global WasInPathTool10
- return WasInPathTool10
- end
-
- on Set_WasInPathTool11 theMode
- global WasInPathTool11
- set WasInPathTool11 to Get_SeenINPath()
- end
-
- on Get_WasInPathTool11
- global WasInPathTool11
- return WasInPathTool11
- end
-
- on Set_WasInPathTool12 theMode
- global WasInPathTool12
- set WasInPathTool12 to Get_SeenINPath()
- end
-
- on Get_WasInPathTool12
- global WasInPathTool12
- return WasInPathTool12
- end
-
- on Set_WasInPathTool13 theMode
- global WasInPathTool13
- set WasInPathTool13 to Get_SeenINPath()
- end
-
- on Get_WasInPathTool13
- global WasInPathTool13
- return WasInPathTool13
- end
-
- on Set_CurrentTool theMode
- global CurrentTool
- set CurrentTool to theMode
- end
-
- on Get_CurrentTool
- global CurrentTool
- return CurrentTool
- end
-
- on Set_CurrentSnakeScreens theMode
- global CurrentSnakeScreens
- set CurrentSnakeScreens to theMode
- end
-
- on Get_CurrentSnakeScreens
- global CurrentSnakeScreens
- return CurrentSnakeScreens
- end
-
- on Set_SeenINPath theNum, theItem
- global SEENINPath
- if paramCount() = 2 then
- put theNum into item theItem of SEENINPath
- else
- set SEENINPath to theNum
- end if
- end
-
- on Get_SeenINPath theItem
- global SEENINPath
- if paramCount() = 1 then
- return item theItem of SEENINPath
- else
- return SEENINPath
- end if
- end
-