Requires Effector Set 2. These behaviors are for use with the Alphamania Xtra and its add-on effector sets
property sNum
property overMe
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
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 beginSprite me
set frameCount = 10
set moveMode = VOID
set overMe = -1
set sNum = the spriteNum of me
blur(sprite sNum, [animMode:#static, blurAmount:startBlur, blurResolution:blurResolution])
end
on mouseDown me
set overMe = TRUE
blur(sprite sNum, [animMode:#range, numFrames:frameCount, endBlur:endBlur])
updateStage
end
on mouseEnter me
if the stillDown and overMe = FALSE then
blur(sprite sNum, [animMode:#range, numFrames:frameCount, endBlur:endBlur])
set overMe = TRUE
end if
end
on mouseLeave me
if the stillDown and overMe = TRUE then
blur(sprite sNum, [animMode:#range, numFrames:frameCount, endBlur:startBlur])
set overMe = FALSE
end if
end
on mouseUp me
if overMe = TRUE then
blur(sprite sNum, [animMode:#static, blurAmount:startBlur])
action(me)
updateStage
end if
set overMe = -1
end
on mouseUpOutside me
set overMe = -1
end
on action me
if actionType = #goToFrame then
if value(actionText) > 0 then
go to frame value(actionText) -- go to frame number
else
go to frame actionText -- go to frame label
end if
else if actionType = #doLingo then
do actionText
end if
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA