home *** CD-ROM | disk | FTP | other *** search
- global objSpr, choice1Spr, choice2Spr, rtAnsList, curEx, numEx, orgColor, showAns, piggy, fozzie, hilite
-
- on startMovie
- set hilite to 207
- set curEx to 0
- set numEx to 5
- set numItems to 8
- set showAns to 0
- set piggy to 3
- set fozzie to 4
- set objSpr to 5
- set choice1Spr to 6
- set choice2Spr to 7
- set itemList to []
- repeat with i = 1 to numItems
- addAt(itemList, random(i), i - 1)
- end repeat
- set rtAnsList to []
- repeat with i = 1 to numEx
- addAt(rtAnsList, random(i), getAt(itemList, i))
- end repeat
- end
-
- on SetupEx
- global rtChoice, objSpr, choice1Spr, choice2Spr, rtAnsList, curEx, numEx
- set curEx to curEx + 1
- if curEx >= numEx then
- tell the stage
- NextPage()
- end tell
- abort()
- end if
- puppetSprite(objSpr, 1)
- puppetSprite(choice1Spr, 1)
- puppetSprite(choice2Spr, 1)
- set rtAns to getAt(rtAnsList, curEx)
- set the castNum of sprite objSpr to the number of cast "radio" + rtAns
- set rtLetter to the number of cast "r" + rtAns
- if random(2) = 1 then
- set rtChoice to choice1Spr
- set wrChoice to choice2Spr
- else
- set rtChoice to choice2Spr
- set wrChoice to choice1Spr
- end if
- set the castNum of sprite rtChoice to rtLetter
- set the castNum of sprite wrChoice to rtLetter
- repeat while the castNum of sprite wrChoice = rtLetter
- set Ltr to the number of cast "r" - 1 + random(15)
- if (rtLetter = 52) and (Ltr = 49) then
- set Ltr to rtLetter
- end if
- if (rtLetter = 55) and (Ltr = 50) then
- set Ltr to rtLetter
- end if
- set the castNum of sprite wrChoice to Ltr
- end repeat
- set orgColor to the foreColor of sprite rtChoice
- puppetSprite(objSpr, 0)
- puppetSprite(choice1Spr, 0)
- puppetSprite(choice2Spr, 0)
- end
-
- on pick1
- global rtChoice, choice1Spr
- set the foreColor of sprite choice1Spr to hilite
- if rtChoice = choice1Spr then
- go("rightAns")
- else
- go("wrongAnsPiggy")
- end if
- end
-
- on pick2
- global rtChoice, choice2Spr
- set the foreColor of sprite choice2Spr to hilite
- if rtChoice = choice2Spr then
- go("rightAns")
- else
- go("wrongAnsFozzie")
- end if
- end
-
- on SHowAnswer
- global rtChoice, showAns
- vwSayName(rtChoice)
- repeat with i = 1 to 3
- set the foreColor of sprite rtChoice to hilite
- updateStage()
- startTimer()
- repeat while the timer < 12
- end repeat
- set the foreColor of sprite rtChoice to orgColor
- updateStage()
- startTimer()
- repeat while the timer < 12
- end repeat
- end repeat
- vwSayName(objSpr)
- shFLASH(objSpr, 12, 4)
- set showAns to 1
- go("rightAns")
- end
-
- on P3LegalButton sprNum, func, hiLiteThis, rollover2
- set originColor to the foreColor of sprite hiLiteThis
- set doIt to 0
- repeat while the stillDown
- if rollOver(sprNum) or rollOver(rollover2) then
- set the foreColor of sprite hiLiteThis to hilite
- updateStage()
- set doIt to 1
- next repeat
- end if
- set the foreColor of sprite hiLiteThis to originColor
- updateStage()
- set doIt to 0
- end repeat
- set the foreColor of sprite hiLiteThis to originColor
- vwWaitForSound()
- if doIt then
- do(func)
- end if
- end
-