This behavior expands the size of a sprite on mousewithin,With parameters to change the width, height, and expanding speed. Use this behavior on a bitmap, or vectorshape-sprite
--------- SPRITEXPANDER _____________________________________________________________________
--___________________________________________________________________________________________
--
-- this behavior expands the size of a vector, or bitmap-sprite when the mousecursor
-- is over this sprite. It can be used as RollOver-Expander in a single frame.
--
-- 11/04/2000 D 7 , D 8
--
-- Kurt Koenig * Belgium
--
--____________________________________________________________________________________________
on getPropertyDescriptionList
desclist = [:]
addprop desclist, #pLargeWidth,[#comment:¬
"The size (Width) in pixels when the mouse is over this sprite:", ¬
format: #integer , default: "20"]
addprop desclist, #pLargeHeight,[#comment:¬
"The size (Height) in pixels when the mouse is over this sprite:", ¬
format: #integer , default: "20"]
addprop desclist, #pExSpeed, [ #comment:¬
"The speed when the sprite"s expanding :", ¬
#format: #integer, #range:[#min: 1, #max: 10],¬
#default: "10"]
return desclist
end getPropertyDescriptionList
on getBehaviorDescription
return " This behavior expands the size of a sprite on"&return&" ¬
mousewithin,With parameters to change the width, "&return&"¬
height, and expanding speed. Use this behavior"&return&" ¬
on a bitmap, or vectorshape-sprite Kurt * Belgium"
end getBehaviorDescription
on getBehaviorTooltip me
return "Increase the size of a sprite"&return&"¬
on RollOver in a single frame."
end getBehaviorTooltip
on beginsprite me
pTheWidth = sprite (me. spritenum) . width
pTheHeight = sprite (me. spritenum) . height
end beginsprite
on mousewithin me
if sprite(me.spriteNum).width <= pLargeWidth - pExSpeed then
sprite(me.spriteNum).width = sprite(me.spriteNum).width + pExSpeed
end if
if sprite(me.spriteNum).height <= pLargeHeight - pExSpeed then
sprite(me.spriteNum).height = sprite(me.spriteNum).height + pExSpeed
end if
cursor 200
end mousewithin
on mouseleave me
sprite(me.spriteNum).width = pTheWidth
sprite(me.spriteNum).height = pTheHeight
cursor 0
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA