home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / drdobbs / 1988 / 07 / gasper / gasper.lst
File List  |  1988-05-31  |  4KB  |  131 lines

  1. «LM10»«AL1»«RHA
  2. «VA$fi»     «DAmm/dd/yy»     «TM»     Galley «PN» of «FP»
  3.  
  4. »«PT1»
  5. 1988, Bright Star Technology,Inc.
  6. ======================================================================================================================================
  7. ===================================================================
  8. --********************--
  9. --*   Stack functions        *--
  10. --********************--
  11.  
  12. on startup
  13.  
  14.   --******************************************************--
  15.   --*  Open up the driver using ELON as our synthetic actor and move     *--
  16.   --*  him to where we would like to see him on the screen.                   *--
  17.   --******************************************************--
  18.    RAVE "|~ACTOR ELON~|"
  19.    RAVE "|~MOVE TOP 100 LEFT 150~|"
  20.  
  21. end startup
  22.  
  23. ------------------------------------------------------------------
  24.  
  25. function scroll_line how_many_lines
  26.  
  27.   --******************************************************--
  28.   --*   This function will quickly scroll the field "prose line" the           *--
  29.   --*   number of lines passed in the parameter how_many_lines.           *--
  30.   --******************************************************--
  31.   repeat how_many_lines
  32.     set the scroll of field "prose line"┬
  33.     to the scroll of field "prose line"┬
  34.     + textHeight of field "prose line"
  35.   end repeat
  36.  
  37. end scroll_line
  38.  
  39. -------------------------------------------------------------------
  40.  
  41. function show_and_tell this_text
  42.  
  43.   --******************************************************--
  44.   --*  This function shows what the actor is saying in the field             *--
  45.   --*  face line (located underneath the actor's face) and then says it.   *--
  46.   --******************************************************--
  47.   put this_text into card field "faceline"
  48.   RAVE card field "faceline"
  49.   put empty into card field "faceline"
  50.  
  51. end show_and_tell
  52.  
  53.  
  54.  
  55. ======================================================================================================================================
  56. ===================================================================
  57.  
  58.  
  59. --********************--è--*   Button "A limerick"   *--
  60. --********************--
  61. on mouseUp
  62.  
  63.   --******************************************************--
  64.   --*  When this button is pressed, the limerick field is reset to show  *--
  65.   --*  the first line of the limerick on the screen.                                  *--
  66.   --******************************************************--
  67.   set the scroll of field "prose line" to 60
  68.  
  69.   --******************************************************--
  70.   --*  Each line of the limerick is read from the field  "prose line",        *--
  71.   --*  pronounced, and then scrolled upwards by calling the function      *--
  72.   --*  scroll_line.                                                                                    *--
  73.   --******************************************************--
  74.   repeat with prose_count = 7 to 11 
  75.      RAVE line prose_count of card field "prose line"
  76.      put scroll_line(1) into nothing
  77.   end repeat
  78.  
  79.   --******************************************************--
  80.   --*  Finally we pause a moment, before scrolling the limerick up off   *--
  81.   --*  the screen.                                                                                     *--
  82.   --******************************************************--
  83.   wait for 3 seconds
  84.   put scroll_line(7) into nothing
  85.  
  86. end mouseUp
  87.  
  88.  
  89. ======================================================================================================================================
  90. ===================================================================
  91.  
  92. --********************--
  93. --*   Button "Bad Rating"   *--
  94. --********************--
  95.  
  96. on mouseUp
  97.  
  98.   put show_and_tell ("Sure, let's hear you try it!") into nothing
  99.  
  100.   set the scroll of field "prose line" to 60
  101.   put show_and_tell ("Go ahead, I am listening ..." ) into nothing 
  102.  
  103.   put scroll_line(7) into nothing
  104.   
  105.   put show_and_tell ("What's Wrong?" ) into nothing
  106.   put show_and_tell ("Cat got your tongue?" ) into nothing
  107.  
  108. end mouseUp
  109.  
  110. -------------------------------------------------------------------
  111.  
  112. --********************--
  113. --*   Button "Good Rating" *--è--********************--
  114.  
  115. on mouseUp
  116.  
  117.   put show_and_tell ("Thank You!") into nothing
  118.   put show_and_tell ("You are too kind!" ) into nothing
  119.  
  120. end mouseUp
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.