home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc1_2_x / storybok.sit / Storybook / background_2710.txt < prev    next >
Text File  |  1990-07-24  |  8KB  |  323 lines

  1. -- background: 2710 from stack: in
  2. -- bmap block id: 3172
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: page
  6. ----- HyperTalk script -----
  7. -- no longer used:
  8. --function getdest
  9. set cursor to watch
  10. select empty
  11. set lockScreen to true
  12. push card
  13. go card "Main"
  14. select card field "Cards"
  15. doMenu "Copy field"
  16. pop card
  17. doMenu "Paste field"
  18. set lockText of card field "Cards" to true
  19. push card
  20. go card "Main"
  21. select card button "Click on page name"
  22. doMenu "Copy button"
  23. pop card
  24. doMenu "Paste button"
  25. choose browse tool
  26. set lockScreen to false
  27. put card field "Cards" of card "Main" into card field "Cards"
  28. click at topLeft of card button "Click on page name"
  29. put false into done
  30. repeat until done
  31.   repeat until the mouseClick
  32.   end repeat
  33.   if (the clickH > the left of card field "Cards") and (the clickH < the right of card field "Cards") and (the clickV > the top of card field "Cards") and (the clickV < the bottom of card field "Cards") then
  34.     set lockScreen to true
  35.     set lockText of card field "Cards" to false
  36.     click at the clickLoc
  37.     click at the clickLoc
  38.     put the selection into result
  39.     set lockText of card field "Cards" to true
  40.     set lockScreen to false
  41.     if result is not "" then
  42.       put true into done
  43.     else
  44.       select empty
  45.     end if
  46.   else
  47.     beep
  48.     select empty
  49.   end if
  50. end repeat
  51. set lockScreen to true
  52. select card button "Click on page name"
  53. doMenu "Cut button"
  54. select card field "Cards"
  55. doMenu "Cut field"
  56. choose browse tool
  57. set lockScreen to false
  58. return result
  59. end getdest
  60.  
  61.  
  62.  
  63. -- part 34 (button)
  64. -- low flags: 00
  65. -- high flags: 0000
  66. -- rect: left=6 top=310 right=334 bottom=39
  67. -- title width / last selected line: 0
  68. -- icon id / first selected line: 1011 / 1011
  69. -- text alignment: 1
  70. -- font id: 0
  71. -- text size: 12
  72. -- style flags: 0
  73. -- line height: 16
  74. -- part name: Home Stack
  75. ----- HyperTalk script -----
  76. on mouseUp
  77.   visual dissolve
  78.   go "home"
  79. end mouseUp
  80.  
  81.  
  82.  
  83. -- part 35 (button)
  84. -- low flags: 00
  85. -- high flags: A003
  86. -- rect: left=243 top=308 right=327 bottom=329
  87. -- title width / last selected line: 0
  88. -- icon id / first selected line: 0 / 0
  89. -- text alignment: 1
  90. -- font id: 0
  91. -- text size: 12
  92. -- style flags: 0
  93. -- line height: 16
  94. -- part name: Add Button
  95. ----- HyperTalk script -----
  96. on mouseUp
  97.   global done
  98.   global cancel
  99.   if the visible of background button "Hide Tools" is true then
  100.     send mouseUp to background button "Hide Tools"
  101.     put true into showlater
  102.   else
  103.     put false into showlater
  104.   end if
  105.   push card
  106.   go card "button options"
  107.   put false into done
  108.   put false into cancel
  109.   repeat while not done and not cancel
  110.     send resetSelection
  111.     repeat until the mouseClick
  112.     end repeat
  113.     click at the clickLoc
  114.   end repeat
  115.   if not cancel then
  116.     put "on mouseUp" & numToChar(13) into temp
  117.     if the hilite of card button "Sound effect" is true then
  118.       put chosenSound() after temp
  119.     end if
  120.     if the hilite of card button "Visual effect" is true then
  121.       put chosenEffect() after temp
  122.     end if
  123.     if the hilite of card button "Link to page" is true then
  124.       put chosenPage() after temp
  125.     end if
  126.     put "end mouseUp" & numToChar(13) after temp
  127.     pop card
  128.     send mouseUp to background button "Show Tools"
  129.     doMenu "New Button"
  130.     get the number of buttons
  131.     put the id of button it into newButton
  132.     set the style of button id newButton to transparent
  133.     set the showName of button id newButton to false
  134.     set the script of button id newButton to temp
  135.   else
  136.     pop card
  137.     if showlater then
  138.       send mouseUp to background button "Show Tools"
  139.     end if
  140.   end if
  141. end mouseUp
  142.  
  143.  
  144.  
  145. -- part 36 (button)
  146. -- low flags: 00
  147. -- high flags: A003
  148. -- rect: left=331 top=308 right=327 bottom=417
  149. -- title width / last selected line: 0
  150. -- icon id / first selected line: 0 / 0
  151. -- text alignment: 1
  152. -- font id: 0
  153. -- text size: 12
  154. -- style flags: 0
  155. -- line height: 16
  156. -- part name: Add Field
  157. ----- HyperTalk script -----
  158. on mouseUp
  159.   doMenu "New Field"
  160.   send mouseUp to background button "Show Tools"
  161. end mouseUp
  162.  
  163.  
  164.  
  165. -- part 37 (button)
  166. -- low flags: 00
  167. -- high flags: A003
  168. -- rect: left=155 top=308 right=327 bottom=241
  169. -- title width / last selected line: 0
  170. -- icon id / first selected line: 0 / 0
  171. -- text alignment: 1
  172. -- font id: 0
  173. -- text size: 12
  174. -- style flags: 0
  175. -- line height: 16
  176. -- part name: Add Page
  177. ----- HyperTalk script -----
  178. on mouseUp
  179.   put false into done
  180.   repeat until done
  181.     ask "Name of new page"
  182.     put it into cardname
  183.     put true into done
  184.     repeat with x = 1 to the number of lines of (card field "cards" of card "Main")
  185.       get line x of card field "cards" of card "Main"
  186.       if it is cardname and it is not "" then
  187.         put false into done
  188.         beep
  189.         answer "Name already used!"
  190.       end if
  191.     end repeat
  192.   end repeat
  193.   if cardname is not "" then
  194.     doMenu "New Card"
  195.     put "(Press command-tab if you lose the Tools.)" into field "notes"
  196.     set the name of this card to cardname
  197.     put numToChar(13) & cardname after card field "Cards" of card "Main"
  198.   end if
  199. end mouseUp
  200.  
  201.  
  202.  
  203. -- part 38 (button)
  204. -- low flags: 00
  205. -- high flags: A003
  206. -- rect: left=67 top=308 right=327 bottom=153
  207. -- title width / last selected line: 0
  208. -- icon id / first selected line: 0 / 0
  209. -- text alignment: 1
  210. -- font id: 0
  211. -- text size: 12
  212. -- style flags: 0
  213. -- line height: 16
  214. -- part name: Show Tools
  215. ----- HyperTalk script -----
  216. on mouseUp
  217.   show tool window at 400,50
  218.   show background button "Hide Tools"
  219.   show background field "notes"
  220. end mouseUp
  221.  
  222.  
  223.  
  224. -- part 39 (button)
  225. -- low flags: 80
  226. -- high flags: A003
  227. -- rect: left=67 top=308 right=327 bottom=153
  228. -- title width / last selected line: 0
  229. -- icon id / first selected line: 0 / 0
  230. -- text alignment: 1
  231. -- font id: 0
  232. -- text size: 12
  233. -- style flags: 0
  234. -- line height: 16
  235. -- part name: Hide Tools
  236. ----- HyperTalk script -----
  237. on mouseUp
  238.   hide tool window
  239.   hide background button "Hide Tools"
  240.   hide background field "notes"
  241. end mouseUp
  242.  
  243.  
  244.  
  245. -- part 40 (button)
  246. -- low flags: 00
  247. -- high flags: A003
  248. -- rect: left=419 top=308 right=327 bottom=505
  249. -- title width / last selected line: 0
  250. -- icon id / first selected line: 0 / 0
  251. -- text alignment: 1
  252. -- font id: 0
  253. -- text size: 12
  254. -- style flags: 0
  255. -- line height: 16
  256. -- part name: Go To Page
  257. ----- HyperTalk script -----
  258. on mouseUp
  259.   global done
  260.   global cancel
  261.   if the visible of background button "Hide Tools" is true then
  262.     send mouseUp to background button "Hide Tools"
  263.     put true into showlater
  264.   else
  265.     put false into showlater
  266.   end if
  267.   push card
  268.   go card "main"
  269.   put false into done
  270.   put false into cancel
  271.   repeat while not done and not cancel
  272.     repeat until the mouseClick
  273.     end repeat
  274.     click at the clickLoc
  275.   end repeat
  276.   if not cancel then
  277.     do chosenPage()
  278.   else
  279.     pop card
  280.   end if
  281.   if showlater then
  282.     send mouseUp to background button "Show Tools"
  283.   end if
  284. end mouseUp
  285.  
  286.  
  287.  
  288. -- part 45 (field)
  289. -- low flags: 81
  290. -- high flags: 0002
  291. -- rect: left=150 top=328 right=341 bottom=410
  292. -- title width / last selected line: 0
  293. -- icon id / first selected line: 0 / 0
  294. -- text alignment: 0
  295. -- font id: 4
  296. -- text size: 9
  297. -- style flags: 0
  298. -- line height: 12
  299. -- part name: notes
  300.  
  301.  
  302. -- part 46 (button)
  303. -- low flags: 00
  304. -- high flags: 0000
  305. -- rect: left=40 top=309 right=336 bottom=64
  306. -- title width / last selected line: 0
  307. -- icon id / first selected line: 25002 / 25002
  308. -- text alignment: 1
  309. -- font id: 0
  310. -- text size: 12
  311. -- style flags: 0
  312. -- line height: 16
  313. -- part name: help
  314. ----- HyperTalk script -----
  315. on mouseUp
  316.   push card
  317.   go card "about storybook"
  318.   repeat until the mouseClick
  319.   end repeat
  320.   pop card
  321. end mouseUp
  322.  
  323.