home *** CD-ROM | disk | FTP | other *** search
/ Comic Book Maker: The Smurfs / COMIC.iso / mac / data_m / CBA2_40 / 00014_frameRect.ls < prev    next >
Encoding:
Text File  |  2001-02-22  |  783 b   |  28 lines

  1. property myTimer, myLocList, myLoc, myDirection, myCounter
  2. global gObjList, gObj1
  3.  
  4. on new me, direction
  5.   set direction to (direction + 1) mod 2
  6.   set myDirection to direction + direction - 1
  7.   set myLocList to [221, 218, 212, 203, 190, 168, 146, 133, 124, 118, 115]
  8.   set myCounter to (direction * 12) - myDirection
  9.   return me
  10. end
  11.  
  12. on update me
  13.   set myCounter to myCounter - myDirection
  14.   if myCounter mod 12 then
  15.     set newLocLeft to getAt(myLocList, myCounter)
  16.     set newLocRight to (newLocLeft * -1) + 862
  17.     repeat with i = 62 to 63
  18.       set the locH of sprite i to newLocLeft
  19.       set the locH of sprite (i + 2) to newLocRight
  20.     end repeat
  21.     if not count(the theSelection of gObj1) then
  22.       updateStage()
  23.     end if
  24.   else
  25.     deleteOne(gObjList, me)
  26.   end if
  27. end
  28.