property pToggle -- BOOLEAN: Use to toggle the graphic image used for the sprite. property pBitmapMember1 -- STRING: The first cast member to use for the sprite image. property pBitmapMember2 -- STRING: The second cast member to use for the sprite image. ------------------------------------------------------------- -- This behavior toggles a sprite between two bitmap images -- when the mouse is clicked. -- -- Ken Loge - http://diginoodles.com ------------------------------------------------------------- on beginSprite me pToggle = FALSE -- get the name of the cast member used for this sprite pBitmapMember1 = sprite(me.spriteNum).member.name end on getPropertyDescriptionList me list = [:] addProp list, #pBitmapMember2, [#comment: "Cast member to switch to on mouseUp:", #format: #bitmap, #default: ""] return list end -- toggle which image the sprite uses on mouseUp me if pToggle = FALSE then sprite(me.spriteNum).member = pBitmapMember2 pToggle = TRUE else sprite(me.spriteNum).member = pBitmapMember1 pToggle = FALSE end if end