home *** CD-ROM | disk | FTP | other *** search
- property rat, spriteNum, direc, motion
-
- on beginSprite me
- rat = sprite(spriteNum)
- direc = 8.5
- motion = timeout("ll").new(20, #moveit, me)
- end
-
- on moveit me
- if (rat.locH > 30) and (rat.locH < (the stageRight - the stageLeft - 30)) then
- rat.locH = rat.locH + direc
- else
- rat.flipH = not rat.flipH
- direc = -direc
- rat.locH = rat.locH + direc
- end if
- end
-