On mousewith the sprite animates the text by increasing and decreasing shadow. A very simple behaviour..
--786
--Behaviour: Animate Text Shadow
--Hasan Yasar Kazmi
--Hamdard University Islamabad Pakistan
-- On mousewith the sprite animates the text by increasing and decreasing shadow
on getpropertydescriptionlist me
set MyShadow = [:]
addprop MyShadow,#maxInc,[#comment:"Max Increment in Shadow",#default:1,#format:#integer,#range:[min:1,max:10]]
addprop MyShadow,#Increment,[#comment:"Step Increment in Shadow",#default:1,#format:#integer,#range:[min:1,max:10]]
addprop MyShadow,#Initial,[#comment:"Initial Shadow",#default:1,#format:#integer,#range:[min:0,max:10]]
return MyShadow
end
on beginsprite me
if Increment > maxInc then
alert("Increment value cant be greater than the max value")
exit
end if
spritenum = the spritenum of me
sprite(spritenum).member.dropShadow = Initial
set RangeMax = maxInc+(maxInc mod Increment)
end
on mousewithin me
sprite(spritenum).member.dropShadow = sprite(spritenum).member.dropShadow +Increment
if sprite(spritenum).member.dropShadow = RangeMax then
sprite(spritenum).member.dropShadow =0
end if
updatestage
end
on mouseleave me
sprite(spritenum).member.dropShadow = Initial
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA