home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1995 September / PCD0995.ISO / files / demos / keroppiw / kp_main.dir / 00349.ls < prev    next >
Encoding:
Text File  |  1995-01-25  |  1.3 KB  |  59 lines

  1. on startMovie
  2. end
  3.  
  4. on typetext
  5.   set str to the text of field "textCode"
  6.   set nbWords to the number of words in str
  7.   repeat with x = 1 to nbWords
  8.     set curWord to word x of str
  9.     if char 1 of curWord = "$" then
  10.       delete char 1 of curWord
  11.       set val to value(curWord)
  12.       set count to the timer
  13.       repeat while the timer < (count + val)
  14.       end repeat
  15.       next repeat
  16.     end if
  17.     if char 1 of curWord = "#" then
  18.       delete char 1 of curWord
  19.       puppetSound(curWord & ".AIF")
  20.       updateStage()
  21.       repeat while soundBusy(1)
  22.       end repeat
  23.       next repeat
  24.     end if
  25.     repeat with y = 1 to the number of chars in curWord
  26.       set curChar to char y of curWord
  27.       put curChar after field "diaryText"
  28.       updateStage()
  29.       if ".," contains curChar then
  30.         puppetSound("SpaceKey")
  31.       else
  32.         puppetSound("key" & random(4))
  33.       end if
  34.       go(the frame + 1)
  35.       updateStage()
  36.     end repeat
  37.     put " " after field "diaryText"
  38.   end repeat
  39.   puppetSprite(8, 1)
  40.   set freeze to the timer
  41.   repeat while the timer < (freeze + 60)
  42.   end repeat
  43.   go("exitText")
  44. end
  45.  
  46. on doClickSound
  47.   puppetSound("dlgPop")
  48.   updateStage()
  49. end
  50.  
  51. on doTypeSound
  52.   puppetSound("adrKey")
  53.   updateStage()
  54. end
  55.  
  56. on changeFontSize siz
  57.   set the textSize of field "diaryText" to siz
  58. end
  59.