home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 19 / macformat_19.iso / Rincón del lector / Reader's Contributions / HeadHunter™ / v tx.Dxr / 00006.ls < prev    next >
Encoding:
Text File  |  1996-07-23  |  1.0 KB  |  40 lines

  1. on typeText
  2.   set str to the text of field "textCode"
  3.   set nbWords to the number of words in str
  4.   repeat with x = 1 to nbWords
  5.     set curWord to word x of str
  6.     if char 1 of curWord = "$" then
  7.       delete char 1 of curWord
  8.       set val to value(curWord)
  9.       set count to the timer
  10.       repeat while the timer < (count + val)
  11.       end repeat
  12.       next repeat
  13.     end if
  14.     if char 1 of curWord = "#" then
  15.       delete char 1 of curWord
  16.       puppetSound(curWord & ".AIF")
  17.       updateStage()
  18.       repeat while soundBusy(1)
  19.       end repeat
  20.       next repeat
  21.     end if
  22.     repeat with y = 1 to the number of chars in curWord
  23.       set curChar to char y of curWord
  24.       put curChar after field "diaryText"
  25.       updateStage()
  26.       if ".," contains curChar then
  27.         puppetSound("Key1")
  28.       else
  29.         puppetSound("key1")
  30.       end if
  31.       go(the frame + 1)
  32.       updateStage()
  33.     end repeat
  34.     put " " after field "diaryText"
  35.   end repeat
  36.   set freeze to the timer
  37.   repeat while the timer < (freeze + 60)
  38.   end repeat
  39. end
  40.