Has the image change when the mouse is over it and has the image change again when the mouse is down.
property UpImage, RolloverImage, DownImage
on mouseEnter me
set the member of sprite the spritenum of me = the RolloverImage of me
end
on mouseWithin me
set the member of sprite the spritenum of me = the RolloverImage of me
if the mousedown then
set the member of sprite the spritenum of me = the DownImage of me
end if
end
on mouseLeave me
set the member of sprite the spritenum of me = the UpImage of me
end
on mouseUp me
set the member of sprite the spritenum of me = the UpImage of me
end
on mouseUpOutside me
set the member of sprite the spritenum of me = the UpImage of me
end
on getPropertyDescriptionList
set p_list = [#UpImage: [ #comment: "Button UP Image:",¬
#format: #member, ¬
#default: ""],¬
#RolloverImage: [ #comment: "Button ROLLOVER Image:",¬
#format: #member, ¬
#default: ""],¬
#DownImage: [ #comment: "Button DOWN Image:",¬
#format: #member, ¬
#default: ""]¬
]
return p_list
end
on getBehaviorDescription
return ¬
"Produces a button animantion with three button states. And UP state, a DOWN state and a ROLLOVER state. When the mouse is not on the button, it is in the UP state. When the mouse is over the button, it is in the ROLLOVER state. And finally, when the mouse is over the button and down, it is in the DOWN state." & RETURN & ¬
"PARAMETERS:" & RETURN & ¬
"• UpImage - The image of the button in its UP state." & RETURN & ¬
"• RolloverImage - The image of the button in its ROLLOVER state." & RETURN & ¬
"• DownImage - The image of the button in its DOWN state."
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA