home *** CD-ROM | disk | FTP | other *** search
- on initMC
- set_NumOfTries(0)
- set_showMeSP(41)
- if get_practiceNum() = 1 then
- set_MCScore(3)
- set_rightAns(3)
- UpdateAnsCurs(17, 25, 3)
- else
- if get_practiceNum() = 2 then
- set_MCScore(3)
- set_rightAns(3)
- UpdateAnsCurs(17, 19, 3)
- else
- if get_practiceNum() = 3 then
- set_MCScore(3)
- set_rightAns(2)
- UpdateAnsCurs(17, 25, 3)
- else
- if get_practiceNum() = 4 then
- set_MCScore(3)
- set_rightAns(6)
- UpdateAnsCurs(17, 25, 3)
- else
- if get_practiceNum() = 5 then
- set_MCScore(5)
- set_rightAns(4)
- UpdateAnsCurs(17, 25, 3)
- end if
- end if
- end if
- end if
- end if
- UpdateCursors(get_showMeSP(), 3)
- end
-
- on updateThisMCScore
- if get_MCScore() > 0 then
- set_MCScore(get_MCScore() + 1 - get_NumOfTries())
- end if
- updateScore(get_MCScore(), get_practiceNum() + 1)
- end
-
- on pressAns theAns
- sound stop 2
- if get_NumOfTries() < 3 then
- if get_nowPressedAns() <> 0 then
- UpdateCursors(get_nowPressedAns() + 16, 3)
- end if
- UpdateCursors(theAns + 16, 0)
- updateStage()
- set_NumOfTries(get_NumOfTries() + 1)
- do("pressAns" & get_practiceNum() && theAns)
- set_nowPressedAns(theAns)
- end if
- end
-
- on pressAns1 theAns
- if theAns = get_rightAns() then
- UpdateAnsCurs(17, 25, 0)
- updateThisMCScore()
- go("t3-rightAns")
- else
- if get_NumOfTries() < 3 then
- go("fb1." & item theAns of "1,2,0,4,5,6,7,8,9" & ".1")
- else
- UpdateAnsCurs(17, 25, 0)
- go("fb8.1")
- end if
- end if
- end
-
- on pressAns2 theAns
- if theAns = get_rightAns() then
- UpdateAnsCurs(17, 19, 0)
- updateThisMCScore()
- go("t5-rightAns")
- else
- if get_NumOfTries() < 3 then
- go("fb" & item theAns of "3,4,0" & ".2")
- else
- UpdateAnsCurs(17, 19, 0)
- go("fb9.2")
- end if
- end if
- end
-
- on pressAns3 theAns
- if theAns = get_rightAns() then
- UpdateAnsCurs(17, 25, 0)
- updateThisMCScore()
- go("t7-rightAns")
- else
- if get_NumOfTries() < 3 then
- go("fb5." & item theAns of "1,0,3,4,5,6,7,8,9" & ".3")
- else
- UpdateAnsCurs(17, 25, 0)
- go("fb8.3")
- end if
- end if
- end
-
- on pressAns4 theAns
- if theAns = get_rightAns() then
- UpdateAnsCurs(17, 25, 0)
- updateThisMCScore()
- go("t9-rightAns")
- else
- if get_NumOfTries() < 3 then
- go("fb2." & item theAns of "1,2,3,4,5,0,7,8,9" & ".4")
- else
- UpdateAnsCurs(17, 25, 0)
- go("fb9.4")
- end if
- end if
- end
-
- on pressAns5 theAns
- if theAns = get_rightAns() then
- UpdateAnsCurs(17, 25, 0)
- updateThisMCScore()
- go("t10-rightAns")
- else
- if get_NumOfTries() < 3 then
- go("fb6." & item theAns of "1,2,3,0,5,6,7,8,9" & ".5")
- else
- UpdateAnsCurs(17, 25, 0)
- go("fb8.5")
- end if
- end if
- end
-
- on UpdateAnsCurs bottomVal, topVal, whichCurs
- repeat with i = bottomVal to topVal
- UpdateCursors(i, whichCurs)
- end repeat
- end
-
- on handleShowMe
- set the castNum of sprite get_showMeSP() to cast "SHOWME"
- updateStage()
- sound stop 2
- if get_NumOfTries() = 3 then
- updateScore(0, get_practiceNum() + 1)
- else
- updateScore(99, get_practiceNum() + 1)
- end if
- if get_practiceNum() = 1 then
- go("t3-rightAns")
- else
- if get_practiceNum() = 2 then
- go("t5-rightAns")
- else
- if get_practiceNum() = 3 then
- go("t7-rightAns")
- else
- if get_practiceNum() = 4 then
- go("t9-rightAns")
- else
- if get_practiceNum() = 5 then
- go("t10-rightAns")
- end if
- end if
- end if
- end if
- end if
- end
-
- on updateScore theScore, taskInChapter
- global scoreOrderList, ScoreByTasksList
- set cellLocInList to getAt(scoreOrderList, integer(Get_CurrentTool()))
- set subList to getAt(ScoreByTasksList, cellLocInList)
- setAt(subList, taskInChapter, theScore)
- setAt(ScoreByTasksList, cellLocInList, subList)
- end
-
- on set_NumOfTries int
- global NumOfTries
- set NumOfTries to int
- end
-
- on get_NumOfTries
- global NumOfTries
- return NumOfTries
- end
-
- on set_rightAns theAns
- global RightAns
- set RightAns to theAns
- end
-
- on get_rightAns
- global RightAns
- return RightAns
- end
-
- on set_nowPressedAns int
- global nowPressedAns
- set nowPressedAns to int
- end
-
- on get_nowPressedAns
- global nowPressedAns
- return nowPressedAns
- end
-
- on set_showMeSP int
- global showMeSP
- set showMeSP to int
- end
-
- on get_showMeSP
- global showMeSP
- return showMeSP
- end
-
- on set_practiceNum int
- global practiceNum
- set practiceNum to int
- end
-
- on get_practiceNum
- global practiceNum
- return practiceNum
- end
-
- on set_MCScore int
- global MCScore
- set MCScore to int
- end
-
- on get_MCScore
- global MCScore
- return MCScore
- end
-