home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / winprogs / childenc / oecdemo / shared.dir / 00389.ls < prev    next >
Encoding:
Text File  |  1996-07-24  |  843 b   |  37 lines

  1. on SetUpHText popBox, thesnd, theLH, theLV
  2.   global theCastNum, soundFile, theLocH, theLocV
  3.   set theCastNum to the number of cast popBox
  4.   set soundFile to thesnd
  5.   set theLocH to theLH
  6.   set theLocV to theLV
  7.   go("Hypertext")
  8. end
  9.  
  10. on goToWin winName, sndName
  11.   global soundFile
  12.   set soundFile to sndName
  13.   go(winName)
  14. end
  15.  
  16. on inWinRegion theSprite, textCast
  17.   global CR, windCast, theLocV, theLocH
  18.   if string(textCast) = EMPTY then
  19.     exit
  20.   end if
  21.   set areaList to EMPTY
  22.   set areaList to the text of cast textCast
  23.   set x to the mouseH
  24.   set y to the mouseV
  25.   set tx to the left of sprite value(theSprite)
  26.   set ty to the top of sprite value(theSprite)
  27.   InRect(x, y, tx, ty, areaList)
  28.   set n to the result
  29.   set n to value(n)
  30.   if n > 0 then
  31.     set m to line n of areaList & CR & n
  32.     return m
  33.   else
  34.     return EMPTY
  35.   end if
  36. end
  37.