home *** CD-ROM | disk | FTP | other *** search
/ Global Amiga Experience / globalamigaexperience.iso / graphic / video_presentation / titler_presentation / helm / examples / mathbook (.txt) < prev    next >
Encoding:
Helm Multimedia Book  |  1995-07-10  |  35.7 KB  |  676 lines

  1. MathBook
  2. Scott Nickerson
  3. 08-22-93
  4. on BookOpen
  5. begin
  6.   global index, quiz
  7.   put "Today's assignment: (1) Practice Math, (2) Take Quiz" into
  8. textfield "Display"
  9.   put 3 into selector "Skills"
  10.   put ten into index
  11.   put false into quiz
  12.   NewProblem()
  13. NewProblem
  14. begin
  15.   global theSign, division
  16.   put false into division
  17.   put 0 into b
  18.   while b = 0 begin
  19. put 1 + random(3) into i
  20. put bit i of selector "Skills" into b
  21.   end
  22.   switch i
  23. case 1
  24. put "+" into textfield "Sign"
  25. put "+" into theSign
  26. put " " into textfield "Sign2"
  27. break
  28. case 2
  29. put "-" into textfield "Sign"
  30. put "-" into theSign
  31. put " " into textfield "Sign2"
  32. break
  33. case 3
  34. put "," into textfield "Sign"
  35. put "x" into theSign
  36. put " " into textfield "Sign2"
  37. break
  38. case 4
  39. put true into division
  40. put empty into theSign
  41. put empty into textfield "Sign"
  42. put "." into textfield "Sign2"
  43. break
  44.   put random(9) into Q1
  45.   put random(9) into Q2
  46.   if theSign is "-" and Q1 < Q2 then put Q2 + random(2) into Q1
  47.   if division is true begin
  48. put empty into textfield "Q1"
  49. put Q1 * random(5) into Q2
  50. if Q1 = 0 then put 1 into Q1
  51. put Q1 into textfield "A1"
  52. put Q2 into textfield "Q2"
  53. put emtpy into textfield "A2"
  54.   end
  55.   else begin
  56. put Q1 into textfield "Q1"
  57. put empty into textfield "A2"
  58. put empty into textfield "A1"
  59. put Q2 into textfield "Q2"
  60.   end
  61. NumInsert theNum
  62. begin
  63.   global division
  64.   if division is true begin
  65. get textfield "A2"
  66. if the number of characters of it < 2
  67. if it is empty or it is not zero put theNum after textfield "A2"
  68.   end
  69.   else begin
  70. get textfield "A1"
  71. if the number of characters of it < 2
  72. if it is empty or it is not zero put theNum after textfield "A1"
  73.   end
  74. NumInsert
  75. NewProblem
  76. index
  77. Today's assignment: (1) Practice Math, (2) Take Quiz
  78. Display
  79. Skills
  80. NewProblem
  81. : PPPS
  82. theSign
  83. /    division
  84. Skills
  85. Sign2
  86. Sign2
  87. Sign2
  88. Sign2
  89. /    division
  90. `&5<PS
  91. `&5<PS
  92. New...
  93. Open...
  94. Make Copy...
  95. Streamline...
  96. Preferences...
  97.     Workbench
  98. Help...
  99. About...
  100. Quit...
  101. Paste
  102. Clear
  103. Select All
  104. Cut Page
  105.     Copy Page
  106. Colors
  107. Load...
  108. Save...
  109. Restore Colors
  110. Default Colors
  111. Brush Colors
  112. Image Colors
  113. Last Color Font
  114. Cycle
  115. Grid...
  116. Stop Sound
  117. Show All
  118. Unlock All
  119.     Edit Form
  120. Share
  121.     Next Page
  122. Previous Page
  123. First Page
  124.     Last Page
  125. Backward
  126. Forward
  127.     Last Book
  128.     Browse...
  129. Autobrowse...
  130.     Bookshelf
  131. New Page
  132. Delete Page
  133. New Form
  134. Load Form...
  135. Save Form...
  136. Image
  137. Load...
  138. Save...
  139. Capture...
  140.     Clipboard
  141. Paste
  142. Spare
  143. Swap Frames
  144. Copy to Spare
  145. Merge in Front
  146. Merge in Back
  147. Delete Spare
  148. Frame
  149. Previous
  150. Delete
  151. Copy to All
  152. Color
  153. Remap
  154. Transparency
  155. Paper <-> Pen
  156. Paper ->  Pen
  157. Count
  158. Vertical
  159. Horizontal
  160. Info...
  161. Brush
  162. Load...
  163. Save...
  164. Restore
  165.     Clipboard
  166. Paste
  167. Color
  168. Remap
  169. Transparency
  170. Paper <-> Pen
  171. Paper ->  Pen
  172. Center
  173. Corner
  174.     Any Point
  175. Any Size
  176. Halve
  177. Double
  178. Halve Width
  179. Halve Height
  180. Double Width
  181. Double Height
  182. To PAL
  183. To NTSC
  184. Vertical
  185. Horizontal
  186. Shear
  187. Vertical
  188. Horizontal
  189. Rotate
  190.     Any Angle
  191. Paint
  192. Matte
  193. Color
  194. Replace
  195. Smear
  196. Dissolve
  197. Spare
  198. Cycle
  199. Cycle 2
  200. Gradient
  201. Gradient 2
  202. Smudge
  203. Chaos
  204. Count
  205. Custom
  206. Dither
  207. Edges
  208. Object
  209. Load...
  210. Save...
  211. Bring to Front
  212. Send to Back
  213. Bring Closer
  214. Send Farther
  215. Group
  216. Ungroup
  217. Duplicate...
  218. Align...
  219. Info...
  220. Actions...
  221.     Script...
  222. Load...
  223. Save...
  224. Plain
  225.     Underline
  226. Italic
  227. Shadow
  228. Font...
  229. Spacing...
  230.     Hypertext
  231. Actions...
  232.     Script...
  233. Tools
  234. Coordinates
  235.     Title Bar
  236. Palette
  237. Colors
  238. Patterns
  239. Paint Tools
  240. Paint Types
  241.     Histogram
  242.     Magnifier
  243. Messages
  244. Draw Tools
  245. Layers
  246. Pages
  247. Author
  248. Book...
  249. Form...
  250. Page...
  251. Display...
  252. Narrator...
  253. Hypertext...
  254. Resources...
  255.     Effect...
  256. Effect Area
  257. fdf`V
  258. Avant-Bold15
  259. Math40
  260. topaz.font
  261. 24GLOB
  262. work:books/Chicago23
  263. ram:Testbook
  264. Ram Disk:Brown.colors
  265. /MathBook.bkp
  266. &Quiz finished! You got 100%. Good job.
  267. MathBook V1.0 
  268.                                                                                                               (29-Dec-93)
  269. by Eagle Tree Software
  270. QHelp drill your children in basic arithmetic with this book. Click on 'Take Quiz'
  271. Qto take a ten problem quiz, or click on 'Practice' to try a single problem. Enter
  272. Qan answer with the blue keys; then click 'OK' or press the Enter key to check the
  273. Gresult. Problems are created randomly. The problem types that Helm will
  274. Iuse are checked in the lower left checkbox selector. Notice that division
  275. *problems are displayed in fractional form.
  276. @C   Clear
  277. @($43)OK
  278. @T   Take Quiz
  279. Skills
  280. @P   Practice
  281.     @Q   Quit
  282. @I   Information
  283. @B   Bookshelf
  284. Smile
  285. Display
  286. Sign2
  287. ~@EExit
  288. %on SelectUp
  289. begin
  290.   NumInsert(7)
  291. NumInsert
  292. %on SelectUp
  293. begin
  294.   NumInsert(8)
  295. NumInsert
  296. %on SelectUp
  297. begin
  298.   NumInsert(9)
  299. NumInsert
  300. %on SelectUp
  301. begin
  302.   NumInsert(4)
  303. NumInsert
  304. %on SelectUp
  305. begin
  306.   NumInsert(5)
  307. NumInsert
  308. 'on SelectUp
  309. begin
  310. NumInsert(6)
  311. NumInsert
  312. %on SelectUp
  313. begin
  314.   NumInsert(1)
  315. NumInsert
  316. %on SelectUp
  317. begin
  318.   NumInsert(2)
  319. NumInsert
  320. %on SelectUp
  321. begin
  322.   NumInsert(3)
  323. NumInsert
  324. %on SelectUp
  325. begin
  326.   NumInsert(0)
  327. NumInsert
  328. on SelectUp
  329. begin
  330.   global division
  331.   if division is true put empty into textfield "A2"
  332.   else put empty into textfield "A1"
  333. /    division
  334. on SelectUp
  335. begin
  336.   global index, quiz, correct, theSign, division
  337.   put false into isOK
  338.   if theSign is "+" then
  339. if (textfield "Q1") + (textfield "Q2") = textfield "A1"
  340. put true into isOk
  341.   if theSign is "-" then
  342. if (textfield "Q1") - (textfield "Q2") = textfield "A1"
  343. put true into isOk 
  344.   if theSign is "x" then
  345. if (textfield "Q1") * (textfield "Q2") = textfield "A1"
  346. put true into isOk
  347.   if division is true then
  348. if (textfield "Q2") / (textfield "A1") = textfield "A2"
  349. put true into isOk
  350.   if isOk is true
  351.   begin
  352. play notes "c7:ex d e f g a g f e d c"
  353. click on imagefield "Smile"
  354. add one to correct
  355.   end
  356.   else begin
  357. if division put empty into textfield "A2"
  358. else put empty into textfield "A1"
  359. play notes "c#2q"
  360.   end
  361.   if the index is ten begin
  362. if quiz is true begin
  363. put trunc(100 * (correct / 10.0)) into score
  364. put "Quiz finished! You got " & score & "%. " into textfield "Display"
  365. if score < 70 put "See me after class." after textfield "Display"
  366. else put "Good job." after textfield "Display"
  367. put false into quiz
  368. put 165 into n
  369. for i = 1 to 72 begin
  370. play notes 60 + random(30)
  371. delay 1
  372. set the hsv of 5 to n, 242, 119
  373. add 5 to n
  374. if n >= 360 n = 0
  375. play notes "r"
  376. set the rgb8 of 5 to 5, 117, 89
  377.   end
  378.   else begin
  379. add one to the index
  380. NewProblem()
  381.   end
  382. index
  383. correct
  384. theSign
  385. /    division
  386. c7:ex d e f g a g f e d c
  387. Smile
  388. Quiz finished! You got 
  389. Display
  390. FSee me after class.
  391. Display
  392. Good job.
  393. Display
  394. YNewProblem
  395. on SelectUp
  396. begin
  397.   global index, quiz, correct
  398.   if selector "Skills" is zero then put one into selector "Skills"
  399.   NewProblem()
  400.   put one into index
  401.   put true into quiz
  402.   put zero into correct
  403.   put "Be quiet!!! Take Quiz." into textfield "Display"
  404. index
  405. correct
  406. Skills
  407. Skills
  408. NewProblem
  409. Be quiet!!! Take Quiz.
  410. Display
  411. @AAddition
  412. @SSubtraction
  413. @MMultiplication
  414. @DDivision
  415. on SelectUp
  416. begin
  417.   global index, quiz
  418.   if selector "Skills" is zero then put one into selector "Skills"
  419.   NewProblem()
  420.   put ten into index
  421.   put false into quiz
  422.   put "Try one problem at a time." into textfield "Display"
  423. index
  424. Skills
  425. Skills
  426. NewProblem
  427. Try one problem at a time.
  428. Display
  429. non SelectUp
  430. begin
  431.   answer "\nDrop out of MathBook?\n" with "@NNo" or "~@YYes"
  432.   if it is "Yes" then quit
  433. Drop out of MathBook?
  434. ~@YYes
  435. on SelectUp
  436. begin
  437.   set the pointer to 6
  438.   lock display
  439.   set the visibility of layer "Info" to true
  440.   set the lock of layer "P1" to true
  441.   unlock display with wipe down
  442.   set the pointer to 0
  443. on SelectUp
  444. begin
  445.   put "Class Dismissed. See you tomorrow." into textfield "Display"
  446.   delay 5
  447.   go to the book "Bookshelf"
  448. Class Dismissed. See you tomorrow.
  449. Display
  450. Bookshelf
  451. on SelectUp
  452. begin
  453.   set the pointer to 6
  454.   lock display
  455.   set the visibility of layer "Info" to false
  456.   set the lock of layer "P1" to false
  457.   unlock display with wipe down
  458.   set the pointer to 0
  459. ANIMFORM
  460. ILBMBMHD
  461. @DPAN
  462. wwfUCRNG
  463. ILBMANHD
  464. ILBMANHD
  465. ILBMANHD
  466. ILBMANHD
  467. ILBMANHD
  468. ggggggg
  469. <xxxy
  470. xxxxxxxxxxxx{0
  471. xxxxxx
  472. <xxxy
  473. xxxxxxxx
  474. xxxxxx
  475. <xxxx
  476. xxxxxxxx
  477. xxxxxx
  478. <xxxx6
  479. xxxxxxx
  480. xxxxxx
  481. gggggg
  482. Name                            
  483. 4Today's assignment: (1) Practice Math, (2) Take Quiz
  484. MathBook V1.0 
  485.                                                                                                               (29-Dec-93)
  486. by Eagle Tree Software
  487. QHelp drill your children in basic arithmetic with this book. Click on 'Take Quiz'
  488. Qto take a ten problem quiz, or click on 'Practice' to try a single problem. Enter
  489. Qan answer with the blue keys; then click 'OK' or press the Enter key to check the
  490. Gresult. Problems are created randomly. The problem types that Helm will
  491. Iuse are checked in the lower left checkbox selector. Notice that division
  492. *problems are displayed in fractional form.
  493. @C   Clear
  494. @($43)OK
  495. @T   Take Quiz
  496. Skills
  497. @P   Practice
  498.     @Q   Quit
  499. @I   Information
  500. @B   Bookshelf
  501. Smile
  502. Display
  503. Sign2
  504. ~@EExit
  505. %on SelectUp
  506. begin
  507.   NumInsert(7)
  508. NumInsert
  509. %on SelectUp
  510. begin
  511.   NumInsert(8)
  512. NumInsert
  513. %on SelectUp
  514. begin
  515.   NumInsert(9)
  516. NumInsert
  517. %on SelectUp
  518. begin
  519.   NumInsert(4)
  520. NumInsert
  521. %on SelectUp
  522. begin
  523.   NumInsert(5)
  524. NumInsert
  525. 'on SelectUp
  526. begin
  527. NumInsert(6)
  528. NumInsert
  529. %on SelectUp
  530. begin
  531.   NumInsert(1)
  532. NumInsert
  533. %on SelectUp
  534. begin
  535.   NumInsert(2)
  536. NumInsert
  537. %on SelectUp
  538. begin
  539.   NumInsert(3)
  540. NumInsert
  541. %on SelectUp
  542. begin
  543.   NumInsert(0)
  544. NumInsert
  545. on SelectUp
  546. begin
  547.   global division
  548.   if division is true put empty into textfield "A2"
  549.   else put empty into textfield "A1"
  550. /    division
  551. on SelectUp
  552. begin
  553.   global index, quiz, correct, theSign, division
  554.   put false into isOK
  555.   if theSign is "+" then
  556. if (textfield "Q1") + (textfield "Q2") = textfield "A1"
  557. put true into isOk
  558.   if theSign is "-" then
  559. if (textfield "Q1") - (textfield "Q2") = textfield "A1"
  560. put true into isOk 
  561.   if theSign is "x" then
  562. if (textfield "Q1") * (textfield "Q2") = textfield "A1"
  563. put true into isOk
  564.   if division is true then
  565. if (textfield "Q2") / (textfield "A1") = textfield "A2"
  566. put true into isOk
  567.   if isOk is true
  568.   begin
  569. play notes "c7:ex d e f g a g f e d c"
  570. click on imagefield "Smile"
  571. add one to correct
  572.   end
  573.   else begin
  574. if division put empty into textfield "A2"
  575. else put empty into textfield "A1"
  576. play notes "c#2q"
  577.   end
  578.   if the index is ten begin
  579. if quiz is true begin
  580. put trunc(100 * (correct / 10.0)) into score
  581. put "Quiz finished! You got " & score & "%. " into textfield "Display"
  582. if score < 70 put "See me after class." after textfield "Display"
  583. else put "Good job." after textfield "Display"
  584. put false into quiz
  585. put 165 into n
  586. for i = 1 to 72 begin
  587. play notes 60 + random(30)
  588. delay 1
  589. set the hsv of 5 to n, 242, 119
  590. add 5 to n
  591. if n >= 360 n = 0
  592. play notes "r"
  593. set the rgb8 of 5 to 5, 117, 89
  594.   end
  595.   else begin
  596. add one to the index
  597. NewProblem()
  598.   end
  599. index
  600. correct
  601. theSign
  602. /    division
  603. c7:ex d e f g a g f e d c
  604. Smile
  605. Quiz finished! You got 
  606. Display
  607. FSee me after class.
  608. Display
  609. Good job.
  610. Display
  611. YNewProblem
  612. on SelectUp
  613. begin
  614.   global index, quiz, correct
  615.   if selector "Skills" is zero then put one into selector "Skills"
  616.   NewProblem()
  617.   put one into index
  618.   put true into quiz
  619.   put zero into correct
  620.   put "Be quiet!!! Take Quiz." into textfield "Display"
  621. index
  622. correct
  623. Skills
  624. Skills
  625. NewProblem
  626. Be quiet!!! Take Quiz.
  627. Display
  628. @AAddition
  629. @SSubtraction
  630. @MMultiplication
  631. @DDivision
  632. on SelectUp
  633. begin
  634.   global index, quiz
  635.   if selector "Skills" is zero then put one into selector "Skills"
  636.   NewProblem()
  637.   put ten into index
  638.   put false into quiz
  639.   put "Try one problem at a time." into textfield "Display"
  640. index
  641. Skills
  642. Skills
  643. NewProblem
  644. Try one problem at a time.
  645. Display
  646. non SelectUp
  647. begin
  648.   answer "\nDrop out of MathBook?\n" with "@NNo" or "~@YYes"
  649.   if it is "Yes" then quit
  650. Drop out of MathBook?
  651. ~@YYes
  652. on SelectUp
  653. begin
  654.   set the pointer to 6
  655.   lock display
  656.   set the visibility of layer "Info" to true
  657.   set the lock of layer "P1" to true
  658.   unlock display with wipe down
  659.   set the pointer to 0
  660. on SelectUp
  661. begin
  662.   put "Class Dismissed. See you tomorrow." into textfield "Display"
  663.   delay 5
  664.   go to the book "Bookshelf"
  665. Class Dismissed. See you tomorrow.
  666. Display
  667. Bookshelf
  668. on SelectUp
  669. begin
  670.   set the pointer to 6
  671.   lock display
  672.   set the visibility of layer "Info" to false
  673.   set the lock of layer "P1" to false
  674.   unlock display with wipe down
  675.   set the pointer to 0
  676.