home *** CD-ROM | disk | FTP | other *** search
- property NSconstraint, stopLoc, lastTicks, changePeriod
-
- on beginSprite
- set lastTicks to the ticks
- end
-
- on mouseDown
- set Ns to the currentSpriteNum
- set the blend of sprite Ns to 100
- set hOffset to the mouseH - the locH of sprite Ns
- repeat while the stillDown
- set newHloc to constrainH(NSconstraint, the mouseH - hOffset)
- set the locH of sprite Ns to newHloc
- updateStage()
- if newHloc >= stopLoc then
- go(#next)
- exit
- end if
- end repeat
- end
-
- on exitFrame
- set diff to the ticks - lastTicks
- set Ns to the currentSpriteNum
- if diff >= (changePeriod * 2) then
- set the blend of sprite Ns to 100
- set lastTicks to the ticks
- exit
- end if
- if (diff >= changePeriod) and (the blend of sprite Ns = 100) then
- set the blend of sprite Ns to 60
- end if
- end
-
- on getPropertyDescriptionList
- set p_list to [#NSconstraint: [#comment: "Sprite di vincolo:", #format: #integer, #default: 0, #range: 1, 5: 120], #stopLoc: [#comment: "Stop al pixel:", #format: #integer, #default: 640], #changePeriod: [#comment: "Periodo di lampeggio:", #format: #integer, #default: 30]]
- return p_list
- end
-