home *** CD-ROM | disk | FTP | other *** search
- property myAction, myParams, ancestor, myObj, updateBeforeAction, hasText, makeSoundDown, makeSoundUp
-
- on beginSprite me
- if makeSoundDown = #none then
- set makeSoundDown to 0
- else
- set makeSoundDown to the number of member string(makeSoundDown)
- end if
- if makeSoundUp = #none then
- set makeSoundUp to 0
- else
- set makeSoundUp to the number of member string(makeSoundUp)
- end if
- set ancestor to new(script "BasicBtnBhvr")
- init(me)
- set myObj to value(myObj)
- if hasText then
- set theSprite to the mySprite of me - 1
- set the scriptInstanceList of sprite theSprite to [me]
- set the locH of sprite theSprite to the locH of sprite the mySprite of me - (the width of the member of sprite theSprite / 2) + 10
- set the locV of sprite theSprite to the locV of sprite the mySprite of me - 3 + the height of the member of sprite the mySprite of me
- end if
- end
-
- on doAction me
- if updateBeforeAction then
- updateStage()
- end if
- call(myAction, myObj, myParams)
- end
-
- on getPropertyDescriptionList
- set x to [#none, "-", #changeGraphicType, "-", #addFrame, #duplicateFrame, #deleteFrame, #changeFrameSize, "-", #flipSelection, #deleteSelection, #layerSelection, #editText, "-", #newFile, #openFile, #saveFile, #printFile, #adjustSound, #quitProgram, "-", #scrollRow]
- set s to ["gObj1", "gObj2", "gObj3", "gObj4", "gObj5", "gObj6"]
- return [#myAction: [#comment: "Handler:", #format: #symbol, #range: x, #default: getAt(x, 1)], #myObj: [#comment: "Object to send to:", #format: #script, #range: s, #default: 1], #myParams: [#comment: "Params:", #format: #integer, #default: VOID], #updateBeforeAction: [#comment: "Update before Action:", #format: #boolean, #default: 1], #hasText: [#comment: "Has text:", #format: #boolean, #default: 0], #makeSoundDown: [#comment: "Make soundDown:", #format: #symbol, #range: [#none, #btnDown], #default: 1], #makeSoundUp: [#comment: "Make soundUp:", #format: #symbol, #range: [#none, #btnUp, #switchRow, #layerUp, #layerDown], #default: 1]]
- end
-