home *** CD-ROM | disk | FTP | other *** search
/ Comic Book Maker: The Smurfs / COMIC.iso / mac / data_m / dialog / 00004_BasicDlogActionBtn.ls < prev    next >
Encoding:
Text File  |  1999-07-07  |  2.0 KB  |  39 lines

  1. property myAction, myParams, ancestor, myObj, updateBeforeAction, setPrev, centerText, makeMeDefault, makeSoundDown, makeSoundUp
  2.  
  3. on beginSprite me
  4.   if makeSoundDown = #none then
  5.     set makeSoundDown to 0
  6.   else
  7.     set makeSoundDown to the number of member string(makeSoundDown)
  8.   end if
  9.   if makeSoundUp = #none then
  10.     set makeSoundUp to 0
  11.   else
  12.     set makeSoundUp to the number of member string(makeSoundUp)
  13.   end if
  14.   set ancestor to new(script "BasicBtnBhvr")
  15.   init(me)
  16.   set myObj to value(myObj)
  17.   if setPrev then
  18.     set the scriptInstanceList of sprite (the currentSpriteNum - 1) to [me]
  19.     if centerText then
  20.       set the locH of sprite (the mySprite of me - 1) to the locH of sprite the mySprite of me - (the width of the member of sprite (the mySprite of me - 1) / 2) + 10
  21.     end if
  22.   end if
  23.   if makeMeDefault then
  24.     set the defaultBtn of script 1 to the mySprite of me
  25.   end if
  26. end
  27.  
  28. on doAction me
  29.   if updateBeforeAction then
  30.     updateStage()
  31.   end if
  32.   call(myAction, myObj, the mySprite of me, myParams)
  33. end
  34.  
  35. on getPropertyDescriptionList
  36.   set x to [#none, "-", #changeTypeSize, #displayPageSetup, #changeColorMode, #scrollField, "-", #preSaveFile, #promptToOverwrite]
  37.   return [#myAction: [#comment: "Handler:", #format: #symbol, #range: x, #default: getAt(x, 1)], #myObj: [#comment: "Object:", #format: #string, #range: ["gObj1", "gObj2", "gObj3", "gObj5", "gObj6", sprite(12), script 1], #default: 1], #myParams: [#comment: "Params:", #format: #integer, #default: VOID], #setPrev: [#comment: "set prev sprite to me:", #format: #boolean, #default: 0], #centerText: [#comment: "centerText?:", #format: #boolean, #default: 0], #updateBeforeAction: [#comment: "Update before Action:", #format: #boolean, #default: 1], #makeMeDefault: [#comment: "defaultBtn?:", #format: #boolean, #default: 0], #makeSoundDown: [#comment: "Make soundDown:", #format: #symbol, #range: [#none, #btnDown], #default: #btnDown], #makeSoundUp: [#comment: "Make soundUp:", #format: #symbol, #range: [#none, #btnUp], #default: #btnUp]]
  38. end
  39.