|
|
|
Blur Rollover-Alphamania
Added on 6/10/1999
|
Requires Effector Set 2. These behaviors are for use with the Alphamania Xtra and its add-on effector sets
property sNum
property mouseLoc
property mode -- blur, or blur in and then out
property startBlur
property endBlur -- where the blur stops and the action begins
property blurResolution
property moveMode -- whether in up or down part of animation
property frameCount -- how much time left in this part of animation
property actionType, actionText -- what to do or where to go
property clickThresh
on getBehaviorDescription me
return "A simple button behavior that plays a blur animation when the user clicks. The blur increases after the user clicks. This creates a fade out/blur effect."
end
on getPropertyDescriptionList me
set list = [:]
addProp list, #startBlur, [#comment: "Normal Blur:", #format: #integer, #default: 0, #range: [#max:10, min:0]]
addProp list, #endBlur, [#comment: "Rollover Blur:", #format: #integer, #default: 5, #range: [#max: 10, #min:0]]
addProp list, #blurResolution, [#comment: "Blur Resolution:", #format: #integer, #default: 1, #range: [#max: 5, #min:1]]
addProp list, #clickThresh, [#comment: "Click Threshold:", #format: #integer, #default: 1, #range: [#max: 255, #min:0]]
return list
end
on beginSprite me
set frameCount = 10
set moveMode = VOID
set sNum = the spriteNum of me
set the clickthreshold of sprite sNum = clickThresh
blur(sprite sNum, [animMode:#static, blurAmount:startBlur, blurResolution:blurResolution])
end
on mouseEnter me
set newLoc = point(the mouseH, the mouseV)
if newLoc <> mouseLoc then
blur(sprite sNum, [animMode:#range, numFrames:frameCount, endBlur:endBlur])
set mouseLoc = point(the mouseH, the mouseV)
end if
end
on mouseLeave me
set newLoc = point(the mouseH, the mouseV)
if newLoc <> mouseLoc then
blur(sprite sNum, [animMode:#range, numFrames:frameCount, endBlur:startBlur])
set mouseLoc = point(the mouseH, the mouseV)
end if
end
|
|