home *** CD-ROM | disk | FTP | other *** search
- global gGameBoard, gGameInPlay, gArt, gDirA, gDirB, gDirC, gTimeOut
-
- on startMovie
- set gTimeOut to 60
- set gDirA to 1
- set gDirB to -1
- set gDirC to 1
- set gGameInPlay to 0
- set the stageColor to 25
- set gArt to 1
- set counter to 30
- repeat while counter < 42
- puppetSprite(counter, 1)
- set counter to counter + 1
- end repeat
- puppetSprite(45, 1)
- puppetSprite(46, 1)
- puppetSprite(47, 1)
- InitGameBoard()
- end
-
- on stopMovie
- killGame(gGameBoard)
- set gGameBoard to 0
- end
-
- on goGallery
- puppetSound("meow2.aiff")
- set thisSprite to the clickOn
- set holdCast to the castNum of sprite thisSprite
- set the castNum of sprite thisSprite to 104
- updateStage()
- repeat while the mouseDown and rollOver(thisSprite)
- end repeat
- set the castNum of sprite thisSprite to holdCast
- if rollOver(thisSprite) then
- doReturn()
- end if
- end
-
- on InitGameBoard
- set gGameBoard to birth(script "aGameBrd", 75, 1, 48)
- set theCast to 40
- set theRevCast to 40
- createNewGame(gGameBoard, theCast, 6, 5, 50, theRevCast)
- startTimer()
- end
-
- on doGMouseDown theSprite
- if gGameInPlay then
- doMouseDown(gGameBoard, theSprite)
- end if
- end
-
- on reset
- reset(gGameBoard)
- end
-
- on Meow
- puppetSound("meow2.aiff")
- set thisSprite to the clickOn
- set holdCast to the castNum of sprite thisSprite
- put the number of cast "MEOWCNTR.PICT"
- set the castNum of sprite thisSprite to the number of cast "MEOWCNTR2.PICT"
- updateStage()
- repeat while the mouseDown and rollOver(thisSprite)
- end repeat
- set the castNum of sprite thisSprite to holdCast
- updateStage()
- end
-
- on Purr
- puppetSound("pur.aiff")
- set thisSprite to the clickOn
- set holdCast to the castNum of sprite thisSprite
- set the castNum of sprite thisSprite to the number of cast "PURRCNTR2.PICT"
- updateStage()
- repeat while the mouseDown and rollOver(thisSprite)
- end repeat
- set the castNum of sprite thisSprite to holdCast
- updateStage()
- end
-
- on PlayGame
- puppetSound("meow1.aiff")
- set thisSprite to the clickOn
- set holdCast to the castNum of sprite thisSprite
- set the castNum of sprite thisSprite to the number of cast "PLAYOPEN.PICT"
- updateStage()
- repeat while the mouseDown and rollOver(thisSprite)
- end repeat
- if rollOver(thisSprite) then
- StartANewGame(gGameBoard)
- set gGameInPlay to 1
- set gTimeOut to 5 * 60
- go("playGame")
- end if
- set the castNum of sprite thisSprite to holdCast
- updateStage()
- end
-
- on doSwapART
- killGame(gGameBoard)
- if gArt = 1 then
- set theCast to 81
- set theRevCast to 41
- set gArt to 2
- else
- set theCast to 144
- set theRevCast to 81
- set gArt to 1
- end if
- createNewGame(gGameBoard, theCast, 6, 5, theCast + 16, theRevCast)
- end
-
- on idle
- if the timer > gTimeOut then
- wiggleButtons()
- if gGameInPlay then
- doTick(gGameBoard)
- else
- scrambleTwoTiles(gGameBoard)
- end if
- startTimer()
- end if
- end
-
- on doNenoLights
- set theSeed_Inner to random(3)
- set theSeed_Middle to random(3)
- set theSeed_Outer to random(3)
- set the castNum of sprite 30 to 55 + theSeed_Inner
- set the castNum of sprite 31 to 58 + theSeed_Middle
- set the castNum of sprite 32 to 61 + theSeed_Outer
- set the castNum of sprite 33 to 66 + theSeed_Inner
- set the castNum of sprite 34 to 69 + theSeed_Middle
- set the castNum of sprite 35 to 72 + theSeed_Outer
- set the castNum of sprite 36 to 77 + theSeed_Inner
- set the castNum of sprite 37 to 80 + theSeed_Middle
- set the castNum of sprite 38 to 83 + theSeed_Outer
- set the castNum of sprite 39 to 88 + theSeed_Inner
- set the castNum of sprite 40 to 91 + theSeed_Middle
- set the castNum of sprite 41 to 94 + theSeed_Outer
- end
-
- on wiggleButtons
- set gDirA to wiggleThisButton(45, 53, 55, gDirA)
- set gDirB to wiggleThisButton(46, 57, 59, gDirB)
- set gDirC to wiggleThisButton(47, 61, 63, gDirC)
- end
-
- on wiggleThisButton theSprite, minCast, maxCast, theDelta
- set holdCast to the castNum of sprite theSprite
- if theDelta > 0 then
- if holdCast = maxCast then
- set theDelta to -1
- set the castNum of sprite theSprite to holdCast - 1
- else
- set the castNum of sprite theSprite to holdCast + 1
- end if
- else
- if holdCast = minCast then
- set theDelta to 1
- set the castNum of sprite theSprite to holdCast + 1
- else
- set the castNum of sprite theSprite to holdCast - 1
- end if
- end if
- return theDelta
- end
-