home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / optimus / agata / home.dir / 00012_washing.ls < prev    next >
Encoding:
Text File  |  1997-02-20  |  667 b   |  27 lines

  1. property myChan, maxFrames, currFrame, castList
  2.  
  3. on birth me, chan
  4.   set myChan to chan
  5.   set the stretch of sprite myChan to 0
  6.   set castList to [580, 580, 580, 581, 581, 581, 582, 582, 582, 583, 583, 583, 584, 584, 584]
  7.   set maxFrames to count(castList)
  8.   set the locH of sprite myChan to 255
  9.   set the locV of sprite myChan to 2
  10.   return me
  11. end
  12.  
  13. on startAnimation me
  14.   set currFrame to 1
  15. end
  16.  
  17. on Animate me
  18.   if currFrame <= maxFrames then
  19.     set castIndex to getAt(castList, currFrame)
  20.     set the castNum of sprite myChan to castIndex
  21.   else
  22.     set the castNum of sprite myChan to 580
  23.     RemoveBOL(theCoord, me)
  24.   end if
  25.   set currFrame to currFrame + 1
  26. end
  27.