home *** CD-ROM | disk | FTP | other *** search
- property myChan1, myChan2, maxFrames, currFrame, cast1List, cast2List
-
- on birth me, chan1, chan2, x, y
- set myChan1 to chan1
- set myChan2 to chan2
- set the stretch of sprite myChan1 to 0
- set the stretch of sprite myChan2 to 0
- set cast1List to [77, 78, 79, 77, 78, 79, 78, 77, 79, 77, 79, 77, 79, 77, 78, 77, 78, 77, 79, 77, 79, 77, 78, 77, 79, 77, 78, 77]
- set cast2List to [82, 80, 81, 82, 80, 81, 82, 80, 81, 82, 80, 81, 82, 80, 81, 82, 80, 81, 82, 80, 81, 82, 80, 81, 82, 80, 81, 82]
- set maxFrames to 28
- set currFrame to 1
- set the locH of sprite the myChan1 of me to x
- set the locV of sprite the myChan1 of me to y
- set the locH of sprite the myChan2 of me to x
- set the locV of sprite the myChan2 of me to y
- return me
- end
-
- on Animate me
- if currFrame > maxFrames then
- set currFrame to 1
- end if
- set cast1Index to getAt(cast1List, currFrame)
- set cast2Index to getAt(cast2List, currFrame)
- set the castNum of sprite myChan1 to cast1Index
- set the castNum of sprite myChan2 to cast2Index
- set currFrame to currFrame + 1
- end
-