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

  1. -- card: 6503 from stack: in
  2. -- bmap block id: 6826
  3. -- flags: 4000
  4. -- background id: 6013
  5. -- name: button options
  6. ----- HyperTalk script -----
  7. on openCard
  8.   global cardLine
  9.   put 1 into cardLine
  10.   set the hilite of card button "Link to page" to true
  11.   do turnOnSound("none")
  12.   set the hilite of card button "Sound effect" to false
  13.   do turnOnVisual("none")
  14.   set the hilite of card button "Visual effect" to false
  15.   put card field "Cards" of card "main" into card field "Cards"
  16.   pass openCard
  17. end openCard
  18.  
  19. function turnOnSound choice
  20. set hilite of card button "beep" to false
  21. set hilite of card button "boing" to false
  22. set hilite of card button "slam" to false
  23. set hilite of card button "harpsichord" to false
  24. if choice is "beep" then
  25.   set hilite of card button "beep" to true
  26.   play "buzzer"
  27. end if
  28. if choice is "boing" then
  29.   set hilite of card button "boing" to true
  30.   play "boing"
  31. end if
  32. if choice is "slam" then
  33.   set hilite of card button "slam" to true
  34.   play "splat"
  35. end if
  36. if choice is "harpsichord" then
  37.   set hilite of card button "harpsichord" to true
  38.   play "harpsichord" tempo 700 g4 a4 b4 c5 d5 c5 b4 a4 g4w
  39. end if
  40. end turnOnSound
  41.  
  42. function turnOnVisual choice
  43. set hilite of card button "dissolve" to false
  44. set hilite of card button "venetian blinds" to false
  45. set hilite of card button "iris open" to false
  46. set hilite of card button "iris close" to false
  47. if choice is "dissolve" then
  48.   set hilite of card button "dissolve" to true
  49. end if
  50. if choice is "venetian blinds" then
  51.   set hilite of card button "venetian blinds" to true
  52. end if
  53. if choice is "iris open" then
  54.   set hilite of card button "iris open" to true
  55. end if
  56. if choice is "iris close" then
  57.   set hilite of card button "iris close" to true
  58. end if
  59. end turnOnVisual
  60.  
  61. function chosenSound
  62. if the hilite of card button "beep" is true then
  63.   return "play" && quote & "buzzer" & quote & numToChar(13)
  64. end if
  65. if the hilite of card button "boing" is true then
  66.   return "play" && quote & "boing" & quote & numToChar(13)
  67. end if
  68. if the hilite of card button "slam" is true then
  69.   return "play" && quote & "splat" & quote & numToChar(13)
  70. end if
  71. if the hilite of card button "harpsichord" is true then
  72.   return "play" && quote & "harpsichord" & quote && "tempo 700 g4 a4 b4 c5 d5 c5 b4 a4 g4w" & numToChar(13)
  73. end if
  74. end chosenSound
  75.  
  76. function chosenEffect
  77. if the hilite of card button "dissolve" is true then
  78.   return "visual effect dissolve slowly" & numToChar(13)
  79. end if
  80. if the hilite of card button "venetian blinds" is true then
  81.   return "visual effect venetian blinds to black" & numToChar(13) & "visual effect venetian blinds" & numToChar(13)
  82. end if
  83. if the hilite of card button "iris open" is true then
  84.   return "visual effect plain to black" & numToChar(13) & "visual effect iris open slowly" & numToChar(13)
  85. end if
  86. if the hilite of card button "iris close" is true then
  87.   return "visual effect iris close slowly to black" & numToChar(13)
  88. end if
  89. end chosenEffect
  90.  
  91.  
  92.  
  93.  
  94.  
  95. -- part 1 (field)
  96. -- low flags: 01
  97. -- high flags: 0007
  98. -- rect: left=329 top=127 right=289 bottom=484
  99. -- title width / last selected line: 0
  100. -- icon id / first selected line: 0 / 0
  101. -- text alignment: 0
  102. -- font id: 4
  103. -- text size: 9
  104. -- style flags: 0
  105. -- line height: 12
  106. -- part name: Cards
  107. ----- HyperTalk script -----
  108. on mouseDown
  109.   global cardLine
  110.   set the hilite of card button "Link to page" to true
  111.   set lockText of card field "Cards" to false
  112.   click at the clickLoc
  113.   click at the clickLoc
  114.   set lockText of card field "Cards" to true
  115.   click at the topLeft of card field "heading"
  116.   put word 2 of the selectedLine into cardLine
  117.   get the selection
  118.   if it is "" then
  119.     select empty
  120.     set the hilite of card button "Link to page" to false
  121.     put 0 into cardLine
  122.   end if
  123. end mouseDown
  124.  
  125.  
  126.  
  127.  
  128. -- part 2 (button)
  129. -- low flags: 00
  130. -- high flags: 8005
  131. -- rect: left=47 top=78 right=96 bottom=155
  132. -- title width / last selected line: 0
  133. -- icon id / first selected line: 0 / 0
  134. -- text alignment: 1
  135. -- font id: 0
  136. -- text size: 12
  137. -- style flags: 0
  138. -- line height: 16
  139. -- part name: Sound effect
  140. ----- HyperTalk script -----
  141. on mouseDown
  142.   if the hilite of me is false then
  143.     send mouseDown to card button "beep"
  144.   else
  145.     set the hilite of me to false
  146.     do turnOnSound("none")
  147.   end if
  148. end mouseDown
  149.  
  150.  
  151.  
  152. -- part 3 (field)
  153. -- low flags: 01
  154. -- high flags: 0000
  155. -- rect: left=39 top=36 right=55 bottom=246
  156. -- title width / last selected line: 0
  157. -- icon id / first selected line: 0 / 0
  158. -- text alignment: 1
  159. -- font id: 3
  160. -- text size: 12
  161. -- style flags: 18688
  162. -- line height: 16
  163. -- part name: heading
  164.  
  165.  
  166. -- part 4 (button)
  167. -- low flags: 00
  168. -- high flags: 8005
  169. -- rect: left=190 top=78 right=96 bottom=298
  170. -- title width / last selected line: 0
  171. -- icon id / first selected line: 0 / 0
  172. -- text alignment: 1
  173. -- font id: 0
  174. -- text size: 12
  175. -- style flags: 0
  176. -- line height: 16
  177. -- part name: Visual effect
  178. ----- HyperTalk script -----
  179. on mouseDown
  180.   if the hilite of me is false then
  181.     send mouseDown to card button "dissolve"
  182.   else
  183.     set the hilite of me to false
  184.     do turnOnVisual("none")
  185.   end if
  186. end mouseDown
  187.  
  188.  
  189.  
  190. -- part 5 (button)
  191. -- low flags: 00
  192. -- high flags: C005
  193. -- rect: left=348 top=78 right=96 bottom=459
  194. -- title width / last selected line: 0
  195. -- icon id / first selected line: 0 / 0
  196. -- text alignment: 1
  197. -- font id: 0
  198. -- text size: 12
  199. -- style flags: 0
  200. -- line height: 16
  201. -- part name: Link to page
  202. ----- HyperTalk script -----
  203. on mouseDown
  204.   global cardLine
  205.   if the hilite of me is false then
  206.     set the hilite of me to true
  207.     put 1 into cardLine
  208.   else
  209.     set the hilite of me to false
  210.     put 0 into cardLine
  211.   end if
  212. end mouseDown
  213.  
  214.  
  215.  
  216. -- part 6 (button)
  217. -- low flags: 00
  218. -- high flags: 8006
  219. -- rect: left=47 top=133 right=151 bottom=104
  220. -- title width / last selected line: 0
  221. -- icon id / first selected line: 0 / 0
  222. -- text alignment: 1
  223. -- font id: 0
  224. -- text size: 12
  225. -- style flags: 0
  226. -- line height: 16
  227. -- part name: beep
  228. ----- HyperTalk script -----
  229. on mouseDown
  230.   if the hilite of card button "Sound effect" is false then
  231.     set the hilite of card button "Sound effect" to true
  232.   end if
  233.   do turnOnSound("beep")
  234. end mouseDown
  235.  
  236.  
  237. -- part 7 (button)
  238. -- low flags: 00
  239. -- high flags: 8006
  240. -- rect: left=47 top=156 right=174 bottom=104
  241. -- title width / last selected line: 0
  242. -- icon id / first selected line: 0 / 0
  243. -- text alignment: 1
  244. -- font id: 0
  245. -- text size: 12
  246. -- style flags: 0
  247. -- line height: 16
  248. -- part name: boing
  249. ----- HyperTalk script -----
  250. on mouseDown
  251.   if the hilite of card button "Sound effect" is false then
  252.     set the hilite of card button "Sound effect" to true
  253.   end if
  254.   do turnOnSound("boing")
  255. end mouseDown
  256.  
  257.  
  258. -- part 8 (button)
  259. -- low flags: 00
  260. -- high flags: 8006
  261. -- rect: left=47 top=179 right=197 bottom=104
  262. -- title width / last selected line: 0
  263. -- icon id / first selected line: 0 / 0
  264. -- text alignment: 1
  265. -- font id: 0
  266. -- text size: 12
  267. -- style flags: 0
  268. -- line height: 16
  269. -- part name: slam
  270. ----- HyperTalk script -----
  271. on mouseDown
  272.   if the hilite of card button "Sound effect" is false then
  273.     set the hilite of card button "Sound effect" to true
  274.   end if
  275.   do turnOnSound("slam")
  276. end mouseDown
  277.  
  278.  
  279. -- part 9 (button)
  280. -- low flags: 00
  281. -- high flags: 8006
  282. -- rect: left=47 top=202 right=220 bottom=150
  283. -- title width / last selected line: 0
  284. -- icon id / first selected line: 0 / 0
  285. -- text alignment: 1
  286. -- font id: 0
  287. -- text size: 12
  288. -- style flags: 0
  289. -- line height: 16
  290. -- part name: harpsichord
  291. ----- HyperTalk script -----
  292. on mouseDown
  293.   if the hilite of card button "Sound effect" is false then
  294.     set the hilite of card button "Sound effect" to true
  295.   end if
  296.   do turnOnSound("harpsichord")
  297. end mouseDown
  298.  
  299.  
  300. -- part 10 (button)
  301. -- low flags: 00
  302. -- high flags: 8006
  303. -- rect: left=190 top=133 right=151 bottom=269
  304. -- title width / last selected line: 0
  305. -- icon id / first selected line: 0 / 0
  306. -- text alignment: 1
  307. -- font id: 0
  308. -- text size: 12
  309. -- style flags: 0
  310. -- line height: 16
  311. -- part name: dissolve
  312. ----- HyperTalk script -----
  313. on mouseDown
  314.   if the hilite of card button "Visual effect" is false then
  315.     set the hilite of card button "Visual effect" to true
  316.   end if
  317.   do turnOnVisual("dissolve")
  318. end mouseDown
  319.  
  320.  
  321. -- part 11 (button)
  322. -- low flags: 00
  323. -- high flags: 8006
  324. -- rect: left=190 top=156 right=174 bottom=313
  325. -- title width / last selected line: 0
  326. -- icon id / first selected line: 0 / 0
  327. -- text alignment: 1
  328. -- font id: 0
  329. -- text size: 12
  330. -- style flags: 0
  331. -- line height: 16
  332. -- part name: venetian blinds
  333. ----- HyperTalk script -----
  334. on mouseDown
  335.   if the hilite of card button "Visual effect" is false then
  336.     set the hilite of card button "Visual effect" to true
  337.   end if
  338.   do turnOnVisual("venetian blinds")
  339. end mouseDown
  340.  
  341.  
  342. -- part 13 (button)
  343. -- low flags: 00
  344. -- high flags: 8006
  345. -- rect: left=190 top=179 right=197 bottom=269
  346. -- title width / last selected line: 0
  347. -- icon id / first selected line: 0 / 0
  348. -- text alignment: 1
  349. -- font id: 0
  350. -- text size: 12
  351. -- style flags: 0
  352. -- line height: 16
  353. -- part name: iris open
  354. ----- HyperTalk script -----
  355. on mouseDown
  356.   if the hilite of card button "Visual effect" is false then
  357.     set the hilite of card button "Visual effect" to true
  358.   end if
  359.   do turnOnVisual("iris open")
  360. end mouseDown
  361.  
  362.  
  363. -- part 14 (button)
  364. -- low flags: 00
  365. -- high flags: 8006
  366. -- rect: left=190 top=202 right=220 bottom=271
  367. -- title width / last selected line: 0
  368. -- icon id / first selected line: 0 / 0
  369. -- text alignment: 1
  370. -- font id: 0
  371. -- text size: 12
  372. -- style flags: 0
  373. -- line height: 16
  374. -- part name: iris close
  375. ----- HyperTalk script -----
  376. on mouseDown
  377.   if the hilite of card button "Visual effect" is false then
  378.     set the hilite of card button "Visual effect" to true
  379.   end if
  380.   do turnOnVisual("iris close")
  381. end mouseDown
  382.  
  383.  
  384. -- part 15 (button)
  385. -- low flags: 00
  386. -- high flags: A003
  387. -- rect: left=266 top=32 right=56 bottom=339
  388. -- title width / last selected line: 0
  389. -- icon id / first selected line: 0 / 0
  390. -- text alignment: 1
  391. -- font id: 0
  392. -- text size: 12
  393. -- style flags: 0
  394. -- line height: 16
  395. -- part name: Done
  396. ----- HyperTalk script -----
  397. on mouseUp
  398.   global done
  399.   put true into done
  400. end mouseUp
  401.  
  402.  
  403.  
  404. -- part 16 (button)
  405. -- low flags: 00
  406. -- high flags: A003
  407. -- rect: left=370 top=32 right=56 bottom=443
  408. -- title width / last selected line: 0
  409. -- icon id / first selected line: 0 / 0
  410. -- text alignment: 1
  411. -- font id: 0
  412. -- text size: 12
  413. -- style flags: 0
  414. -- line height: 16
  415. -- part name: Cancel
  416. ----- HyperTalk script -----
  417. on mouseUp
  418.   global cancel
  419.   put true into cancel
  420. end mouseUp
  421.  
  422.  
  423.  
  424. -- part contents for card part 3
  425. ----- text -----
  426. BUTTON OPTIONS
  427.  
  428. -- part contents for card part 1
  429. ----- text -----
  430. beginning
  431. end