home *** CD-ROM | disk | FTP | other *** search
- property cloud, spriteNum, location, direction, moveme, flippin
-
- on getPropertyDescriptionList
- return [#direction: [#comment: "yadda", #default: 0, #format: #integer, #range: [#min: -10, #max: 10]], #flippin: [#comment: "yadda", #default: 0, #format: #boolean]]
- end
-
- on beginSprite me
- cloud = sprite(spriteNum)
- cloud.flipH = flippin
- location = cloud.locH
- moveme = timeout(string(spriteNum)).new(100, #goe, me)
- end
-
- on goe me
- location = cloud.locH
- if (location > (0 - (cloud.width / 2))) and (location < (the stageRight - the stageLeft + (cloud.width / 2))) then
- cloud.locH = location + direction
- else
- cloud.flipH = not cloud.flipH
- direction = direction * -1
- cloud.locH = location + direction
- end if
- end
-