home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / Reversi.dxr / Internal_3_character.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  432 b   |  23 lines

  1. property obj, spriteNum, poffset
  2.  
  3. on beginSprite me
  4.   obj = sprite(spriteNum)
  5.   poffset = 200
  6. end
  7.  
  8. on exitFrame me
  9.   if not obj.flipH then
  10.     obj.locH = obj.locH - 2
  11.     if obj.locH < -poffset then
  12.       obj.flipH = not obj.flipH
  13.     end if
  14.   else
  15.     if obj.flipH then
  16.       obj.locH = obj.locH + 2
  17.       if obj.locH > ((the stage).rect.width + poffset) then
  18.         obj.flipH = not obj.flipH
  19.       end if
  20.     end if
  21.   end if
  22. end
  23.