home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / misc / math / mathgrap.sit / MathGrapher / card_13172.txt < prev    next >
Encoding:
Text File  |  1989-07-28  |  3.8 KB  |  153 lines

  1. -- card: 13172 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 10000
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on CloseCard
  8.   hide btn 2
  9.   hide btn 3
  10. end CloseCard
  11.  
  12.  
  13.  
  14. -- part 1 (button)
  15. -- low flags: 00
  16. -- high flags: 8003
  17. -- rect: left=210 top=225 right=248 bottom=298
  18. -- title width / last selected line: 0
  19. -- icon id / first selected line: 0 / 0
  20. -- text alignment: 1
  21. -- font id: 0
  22. -- text size: 12
  23. -- style flags: 0
  24. -- line height: 16
  25. -- part name: Show me!
  26. ----- HyperTalk script -----
  27. on mouseUp
  28.   push card
  29.   -- Card 1
  30.   go to card "Graph paper"
  31.   wait for 20 ticks
  32.   repeat 5 times
  33.     set the hilite of btn "Erase Graph" of card "Graph paper" to false
  34.     wait for 10 ticks
  35.     set the hilite of btn "Erase Graph" of card "Graph paper" to true
  36.   end repeat
  37.   lock screen
  38.   pop card
  39.   show cd fld 1
  40.   show btn 2
  41.   show btn 3
  42.   unlock screen with venetian blinds
  43. end mouseUp
  44.  
  45.  
  46.  
  47. -- part 2 (button)
  48. -- low flags: 80
  49. -- high flags: 0002
  50. -- rect: left=23 top=261 right=288 bottom=73
  51. -- title width / last selected line: 0
  52. -- icon id / first selected line: 12394 / 12394
  53. -- text alignment: 1
  54. -- font id: 0
  55. -- text size: 12
  56. -- style flags: 0
  57. -- line height: 16
  58. -- part name: Abscissa
  59. ----- HyperTalk script -----
  60. on mouseDown
  61.   repeat while the mouse is down
  62.     put the MouseV into vert
  63.     if vert < 90 then
  64.       set the loc of the target to 48,90
  65.     else
  66.       if vert > 280 then
  67.         set the loc of the target to 48,280
  68.       else
  69.         get the loc of the target
  70.         put vert into item 2 of it
  71.         set the loc of the target to it
  72.       end if
  73.     end if
  74.   end repeat
  75. end mouseDown
  76.  
  77.  
  78.  
  79. -- part 3 (button)
  80. -- low flags: 80
  81. -- high flags: 0002
  82. -- rect: left=266 top=259 right=302 bottom=293
  83. -- title width / last selected line: 0
  84. -- icon id / first selected line: 10849 / 10849
  85. -- text alignment: 1
  86. -- font id: 0
  87. -- text size: 12
  88. -- style flags: 0
  89. -- line height: 16
  90. -- part name: Ordinate
  91. ----- HyperTalk script -----
  92. on mouseDown
  93.   repeat while the mouse is down
  94.     put the MouseH into horz
  95.     if horz > 468 then
  96.       set the loc of the target to 468,280
  97.     else
  98.       if horz < 47 then
  99.         set the loc of the target to 47,280
  100.       else
  101.         get the loc of the target
  102.         put horz into item 1 of it
  103.         set the loc of the target to it
  104.       end if
  105.     end if
  106.   end repeat
  107. end mouseDown
  108.  
  109.  
  110.  
  111. -- part 4 (field)
  112. -- low flags: 81
  113. -- high flags: 2004
  114. -- rect: left=77 top=64 right=321 bottom=500
  115. -- title width / last selected line: 0
  116. -- icon id / first selected line: 0 / 0
  117. -- text alignment: 0
  118. -- font id: 2
  119. -- text size: 12
  120. -- style flags: 256
  121. -- line height: 16
  122. -- part name: 
  123. ----- HyperTalk script -----
  124. on MouseLeave
  125.   hide me
  126. end MouseLeave
  127.  
  128. on MouseUp
  129.   hide me
  130. end MouseUp
  131.  
  132.  
  133.  
  134. -- part contents for background part 13
  135. ----- text -----
  136. Help Card 6
  137.  
  138. -- part contents for background part 2
  139. ----- text -----
  140. GRAPHING
  141.      After you have your function in the form that you want and your Macintosh can understand, you will be ready to plot your graph.
  142.      Hold on though, there are just a few more steps.  First, there may already be a function plotted on the "graph" paper.  This will not pose any problems when you actually plot your new function but it may get in the way.  If you only want one function to be displayed at a time then you should click on the black button on the bottom of the card called "Erase Graph".
  143.  
  144.  
  145. -- part contents for card part 4
  146. ----- text -----
  147. After you click on the Erase Graph button the entire plot of the old function will be erased and the scale markings of the graph will also be gone. 
  148.  
  149. Two buttons will appear just like the ones on this card.  By clicking on them and dragging you can set the location of the X and the Y axes.
  150.  
  151. The new coordinate grid will be drawn when you plot your new function.  
  152.  
  153. Why don't you practice clicking and draging the two buttons now?