home *** CD-ROM | disk | FTP | other *** search
- on startSndList someSnds
- global gCurrSndList, gCurrSnd, gPlayingClue
- clearSndList()
- set gPlayingClue to 1
- set gCurrSndList to someSnds
- end
-
- on advanceSndList
- global gCurrSndList, gCurrSnd, gFileDelimiter, gListOfCuePoints
- if not soundBusy(1) then
- set gCurrSnd to gCurrSnd + 1
- if (gCurrSndList <> []) and (gCurrSnd <= count(gCurrSndList)) then
- sound playFile 1, getAt(gCurrSndList, gCurrSnd)
- else
- clearSndList()
- end if
- end if
- end
-
- on clearSndList
- global gCurrSndList, gCurrSnd, gPlayingClue, gHelpPlaying
- set gHelpPlaying to 0
- set gPlayingClue to 0
- sound stop 1
- set gCurrSndList to []
- set gCurrSnd to 0
- end
-
- on playrllovrSnd whichBtn
- global gSndPath, gLangSelect, gLangDirect, gFileDelimiter, gHelpPlaying
- if not soundBusy(1) then
- set gHelpPlaying to 0
- set whichSnd to word 1 of the name of member the memberNum of sprite whichBtn of castLib "chooser"
- if gLangDirect = 1 then
- sound playFile 1, gSndPath & "e" & gFileDelimiter & "catName" & gFileDelimiter & whichSnd & ".aif"
- else
- sound playFile 1, gSndPath & gLangSelect & gFileDelimiter & "catName" & gFileDelimiter & whichSnd & ".aif"
- end if
- end if
- end
-
- on doMusicBtn
- global gMusOn, gMusBtn
- if gMusOn = 0 then
- set the memberNum of sprite gMusBtn to the number of member "music off" of castLib "shared"
- end if
- end
-
- on doMusic
- global gMusOn, gMusBtn
- if gMusOn = 1 then
- set gMusOn to 0
- sound stop 3
- set the memberNum of sprite gMusBtn to the number of member "music off" of castLib "shared"
- else
- set gMusOn to 1
- puppetSound(3, "loop")
- set the memberNum of sprite gMusBtn to the number of member "music up" of castLib "shared"
- end if
- end
-
- on playAnswer whichSpt
- set foo to the name of member the memberNum of sprite whichSpt of castLib "quiz"
- set whichAns to word 1 of foo
- set whichAns to (whichAns * 2) - 1
- repeatSnd("answer", whichAns)
- end
-
- on repeatSnd whichSnd, whichAns
- global gLangDirect, gSndPath, gFileDelimiter, gLangSelect, gCat, gWhichQuest, gAnsSndLst, gQuestSndLst, gCurrSndList
- if gCurrSndList = [] then
- set tempLst to []
- case whichSnd of
- "question":
- startSndList(gQuestSndLst)
- "answer":
- set getNum to value(whichAns)
- add(tempLst, getAt(gAnsSndLst, getNum))
- startSndList(tempLst)
- end case
- end if
- end
-
- on doHelp
- global gSndPath, gLangDirect, gLangSelect, gFileDelimiter, gHelpPlaying
- if soundBusy(1) then
- sound stop 1
- clearSndList()
- else
- set gHelpPlaying to 1
- case the frameLabel of
- "chooser":
- set whichHelp to "main.AIF"
- "quiz":
- set whichHelp to "test.AIF"
- "find":
- set whichHelp to "palette.AIF"
- end case
- if gLangDirect = 1 then
- sound playFile 1, gSndPath & "e" & gFileDelimiter & whichHelp
- else
- sound playFile 1, gSndPath & gLangSelect & gFileDelimiter & whichHelp
- end if
- end if
- end
-
- on doFeedBack
- global gAnswerRight, gBear, gFdbkLst, gSndPath, gFileDelimiter
- cursor(4)
- set gFdbkLst to []
- set tempLst to []
- case gAnswerRight of
- "1":
- set wording to "good"
- set whichWay to random(1)
- case whichWay of
- "1":
- set howMany to 33
- end case
- set whichSndBk to random(6)
- "0":
- set wording to "bad"
- set whichWay to random(1)
- case whichWay of
- "1":
- set howMany to 33
- end case
- set whichSndBk to random(3)
- end case
- set whichSndBk to gSndPath & "bear" & gFileDelimiter & wording & whichSndBk & ".aif"
- add(gFdbkLst, whichSndBk)
- repeat with X = 1 to howMany
- add(tempLst, "bear " & whichWay && wording && X)
- end repeat
- preloadMember(member ("bear " & whichWay && wording && "1"), "bear " & whichWay && wording && howMany)
- startAnimaList(tempLst, gBear)
- cursor(-1)
- end
-