home *** CD-ROM | disk | FTP | other *** search
- property myChan1, myChan2, myChan3, maxFrames, currFrame, cast1List, cast2List, cast3List, x1List, humming
-
- on birth me, chan1, chan2, chan3
- set myChan1 to chan1
- set myChan2 to chan2
- set myChan3 to chan3
- set the stretch of sprite myChan1 to 0
- set the stretch of sprite myChan2 to 0
- set the stretch of sprite myChan3 to 0
- set x1List to [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 71, 70, 70, 71, 72, 72, 72, 72, 72]
- set cast1List to [591, 592, 591, 592, 594, 593, 594, 592, 591, 592, 594, 593, 594, 592, 591, 592, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591]
- set cast2List to [595, 596, 595, 595, 596, 596, 596, 595, 595, 596, 596, 596, 596, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595]
- set cast3List to [578, 579, 578, 578, 579, 579, 579, 578, 578, 579, 579, 579, 579, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578]
- set maxFrames to count(cast1List)
- set the locV of sprite myChan1 to 309
- set the locH of sprite myChan2 to 117
- set the locV of sprite myChan2 to 325
- set the locH of sprite myChan3 to 156
- set the locV of sprite myChan3 to 298
- return me
- end
-
- on startAnimation me
- global theCoord
- set currFrame to 1
- set rand to random(1)
- if (rand = 1) and not humming and not (the inHelp of theCoord) and not (the dontHumWinnie of theCoord) then
- if random(3) = 2 then
- sound playFile 3, "HMwhum.aif"
- set humming to 1
- end if
- end if
- end
-
- on Animate me
- if currFrame = maxFrames then
- if soundBusy(3) = 0 then
- set humming to 0
- end if
- end if
- if currFrame <= maxFrames then
- set cast1Index to getAt(cast1List, currFrame)
- set cast2Index to getAt(cast2List, currFrame)
- set cast3Index to getAt(cast3List, currFrame)
- set the castNum of sprite myChan1 to cast1Index
- set the locH of sprite myChan1 to getAt(x1List, currFrame)
- set the castNum of sprite myChan2 to cast2Index
- set the castNum of sprite myChan3 to cast3Index
- else
- if humming then
- startAnimation(me)
- else
- set the castNum of sprite myChan1 to 591
- set the castNum of sprite myChan2 to 595
- set the castNum of sprite myChan3 to 578
- RemoveBOL(theCoord, me)
- end if
- end if
- set currFrame to currFrame + 1
- end
-