home *** CD-ROM | disk | FTP | other *** search
Wrap
property Action, WhichLabel, standardImage, alternateImage on mouseDown emem = the memberNum of sprite clickOn() set the memberNum of sprite clickOn() to emem + 1 updateStage() repeat while the stillDown if rollover(clickOn()) then set the memberNum of sprite clickOn() to emem + 1 else set the memberNum of sprite clickOn() to emem - 1 end if updateStage() end repeat updateStage() set the memberNum of sprite clickOn() to emem updateStage() if Action = "Go to marker" then go(WhichLabel) else if Action = "Play marker" then play frame WhichLabel end if end if end on beginSprite me me.standardImage = the member of sprite me.spriteNum memref = the member of sprite the currentSpriteNum castLibNum = memref.castLibNum alternateImage = member(memref.memberNum + 1, castLibNum) end on mouseWithin me set the member of sprite the spriteNum of me to me.alternateImage end on mouseEnter me set the member of sprite the spriteNum of me to me.alternateImage end on mouseLeave me if the mouseUp then set the member of sprite the spriteNum of me to me.standardImage end if end on getPropertyDescriptionList global ibcDefaultParams if the currentSpriteNum = 0 then memdefault = 0 else memref = the member of sprite the currentSpriteNum castLibNum = memref.castLibNum memdefault = member(memref.memberNum + 1, castLibNum) end if if listp(ibcDefaultParams) then return ibcDefaultParams else description = [:] addProp(description, #Action, [#default: "None", #range: ["None", "Go to marker", "Play marker"], #format: #symbol, #comment: "MouseUp Action:"]) addProp(description, #WhichLabel, [#comment: "Destination Marker:", #format: #marker, #default: "next"]) return description end if end on getBehaviorDescription return "- Click Behavior -" &(RETURN & "Defined: controls a dual-image button.") &(RETURN & "Intended Use: to give user a simple audio + visual feedback that they've engaged a control. Rolling off button during mouseDown will disengage.") &(RETURN & RETURN & "- Properties -") &(RETURN & "MouseUp Action: assigns a button course of action.") &(RETURN & " (Note: Select 'None' if you plan to add a seperate mouseUp behavior to this button)") &(RETURN & "Destination Marker: assigns a destination to the course of action.") &(RETURN & RETURN & "(Explore the 'LookHere' folder on the CD-Rom for examples of each behavior)") end