home *** CD-ROM | disk | FTP | other *** search
- property obj, spriteNum, poffset
-
- on beginSprite me
- obj = sprite(spriteNum)
- poffset = 200
- end
-
- on exitFrame me
- if not obj.flipH then
- obj.locH = obj.locH - 2
- if obj.locH < -poffset then
- obj.flipH = not obj.flipH
- end if
- else
- if obj.flipH then
- obj.locH = obj.locH + 2
- if obj.locH > ((the stage).rect.width + poffset) then
- obj.flipH = not obj.flipH
- end if
- end if
- end if
- end
-