Date: Fri Dec 3 13:09:20 MST 1999 From: Alex Pilson <alex@pilson.com> Subject: Rollover Switch a Target Sprite ChannelDid you ever want to switch another sprite besides the one the mouse is over. Well here is a behavior I wrote for that purpose.
-- Rollover Switch an Alternate Image
-- behavior library Planet Studio Core Asset Library 2.0
-- ©Copyright 1999-2000 by Alex Pilson
property spriteSwitch, switchImage, image2switch
on mouseEnter me
put the member of sprite spriteSwitch into image2switch
set the member of sprite spriteSwitch to the number of member switchImage
end
on mouseLeave me
set the member of sprite spriteSwitch = image2switch
end
on getPropertyDescriptionList
if the currentspritenum = 0 then exit
set memref = the member of sprite the currentspritenum
set memdefault2 = member (the membernum of member memref + 2)
set p_list = [ Â
#spriteSwitch: [ #comment: "Sprite Channel to Switch:", Â
#format: #integer, Â
#default: 1 ],Â
#switchImage: [ #comment: "Rollover Cast Member:", Â
#format: #graphic, Â
#default: memdefault2 ]]
return p_list
end
on getBehaviorDescription
return Â
"Change the a specific sprite's cast member when the mouse rolls over the current sprite."
& RETURN & Â
"PARAMETERS:" & RETURN & Â
"¥ Sprite Channel to Switch - Choose a specific sprite channel to have the image switch
occur."& RETURN & Â
"¥ Rollover Cast Member - Choose a specific cast member to appear when the mouse rolls
over the sprite. This setting is ignored if Use Next Member is on."& RETURN
end
I hope this helps some people out. I think they should have included something like this in the basic behavior package.