home *** CD-ROM | disk | FTP | other *** search
- property myChan1, myChan2, maxFrames, currFrame, cast1List, cast2List, x2List, y2List, var, state
-
- on birth me, chan1, chan2
- set myChan1 to chan1
- set myChan2 to chan2
- set state to #dontMove
- set the stretch of sprite myChan1 to 0
- set the stretch of sprite myChan2 to 0
- return me
- end
-
- on startAnimation me
- set var to random(3)
- do("var" & var & " me")
- set state to #move
- set currFrame to 1
- end
-
- on var1 me
- set cast1List to [204, 206, 206, 206, 206, 205, 205, 205, 205, 205, 205, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 205, 205, 205, 205, 205, 205, 205, 205, 205, 206, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204]
- set x2List to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- set y2List to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- set cast2List to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- set maxFrames to count(cast2List)
- set the locH of sprite myChan1 to 608
- set the locV of sprite myChan1 to 246
- end
-
- on var2 me
- set the foreColor of sprite myChan2 to getAt([20, 37, 85, 97, 113, 141, 162, 244], random(8))
- set cast1List to [204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204]
- set x2List to [584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584]
- set y2List to [209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209]
- set cast2List to [191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 200, 200, 200, 200, 201, 202, 203, 203, 203, 203, 203, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191]
- set maxFrames to count(cast2List)
- set the locH of sprite myChan1 to 608
- set the locV of sprite myChan1 to 246
- end
-
- on var3 me
- set the foreColor of sprite myChan2 to 255
- set cast1List to [204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 221, 221, 218, 218, 218, 218, 218, 218, 204, 204, 204, 204, 204, 204, 204, 204, 222, 220, 219, 220, 219, 220, 220, 220, 220, 220, 219, 219, 218, 221, 218, 219, 219, 218, 218, 219, 219, 218, 218, 219, 219, 218, 218, 222, 220, 219, 219, 219, 219, 219, 219, 219, 220, 222]
- set x2List to [631, 631, 626, 622, 618, 615, 611, 608, 609, 610, 614, 617, 622, 623, 622, 619, 614, 613, 616, 616, 612, 612, 617, 620, 619, 616, 614, 611, 607, 602, 595, 594, 593, 600, 604, 608, 613, 616, 621, 621, 616, 614, 608, 602, 599, 601, 609, 610, 614, 611, 608, 611, 620, 622, 623, 622, 622, 621, 622, 624, 627, 628, 627, 620, 618, 622, 632, 634, 635, 626, 623, 626, 637, 640, 636, 629, 629, 616, 612, 613, 618, 624, 611, 607, 611, 619, 616, 613, 617, 621, 617, 612, 612, 629, 639, 643, 646, 637, 627, 619, 634, 643, 652, 659]
- set y2List to [2, 2, 7, 13, 21, 27, 35, 47, 56, 63, 73, 78, 84, 88, 92, 92, 90, 84, 81, 84, 88, 90, 96, 104, 117, 128, 132, 128, 124, 126, 133, 138, 143, 138, 143, 144, 152, 154, 160, 160, 166, 168, 172, 169, 172, 178, 183, 185, 187, 194, 196, 193, 166, 159, 158, 160, 174, 179, 183, 175, 176, 184, 192, 193, 199, 201, 205, 210, 212, 211, 211, 213, 203, 194, 185, 177, 171, 181, 182, 170, 172, 174, 183, 187, 188, 186, 195, 198, 199, 201, 204, 209, 208, 198, 190, 187, 193, 196, 191, 193, 187, 184, 184, 185]
- set cast2List to [184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223, 184, 223]
- set maxFrames to count(cast2List)
- set the locH of sprite myChan1 to 608
- set the locV of sprite myChan1 to 246
- end
-
- on Animate me
- if state = #dontMove then
- set rand to random(3)
- if (rand = 1) or (rand = 2) then
- startAnimation(me)
- end if
- else
- if currFrame <= maxFrames then
- set cast1Index to getAt(cast1List, currFrame)
- set the locH of sprite myChan2 to getAt(x2List, currFrame)
- set the locV of sprite myChan2 to getAt(y2List, currFrame)
- set cast2Index to getAt(cast2List, currFrame)
- set the castNum of sprite myChan1 to cast1Index
- set the castNum of sprite myChan2 to cast2Index
- else
- set the castNum of sprite myChan1 to 204
- set the castNum of sprite myChan2 to 0
- set state to #dontMove
- end if
- set currFrame to currFrame + 1
- end if
- end
-