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

  1. property cloud, spriteNum, location, direction, moveme
  2.  
  3. on beginSprite me
  4.   cloud = sprite(spriteNum)
  5.   location = cloud.locV
  6.   direction = 1
  7.   moveme = timeout("tbol").new(100, #goe, me)
  8. end
  9.  
  10. on goe me
  11.   location = cloud.locV
  12.   if (location > (0 - (cloud.height / 2))) and (location < (the stageBottom - the stageTop + (cloud.height / 2))) then
  13.     cloud.locV = location + direction
  14.   else
  15.     direction = direction * -1
  16.     cloud.locV = location + direction
  17.     cloud.flipV = not cloud.flipV
  18.   end if
  19. end
  20.