home *** CD-ROM | disk | FTP | other *** search
/ Discovering Nature in the City / LUONTOCD.iso / pc / files / findmswe.dxr / 00001.ls next >
Encoding:
Text File  |  1996-12-16  |  1.9 KB  |  66 lines

  1. global pictureList, movieList, frameList, firstCharList, newSoundName, newMovieName, newFrame, newPicName, gFrameLabel
  2.  
  3. on startMovie
  4.   sound stop 1
  5.   if the freeBlock < 1024 then
  6.     unLoad()
  7.   end if
  8.   set the keyDownScript to "goKey"
  9.   set pictureList to value(the text of field "picturelist")
  10.   set movieList to value(the text of field "movielist")
  11.   set frameList to value(the text of field "framelist")
  12.   set firstCharList to []
  13.   set x to the lineCount of member "list"
  14.   repeat with y = 1 to x
  15.     set z to char 1 of line y of field "list"
  16.     append(firstCharList, z)
  17.   end repeat
  18.   set the scrollTop of member "list" to 1
  19.   hilite line 1 of field "list"
  20.   set theWord to word 1 of field "list"
  21.   set newPicName to getaProp(pictureList, theWord)
  22.   puppetSprite(36, 1)
  23.   set the member of sprite 36 to member newPicName
  24.   set newMovieName to getaProp(movieList, theWord)
  25.   set newFrame to getaProp(frameList, theWord)
  26. end
  27.  
  28. on goKey
  29.   set x to the key
  30.   set y to getOne(firstCharList, x)
  31.   set the scrollTop of member "list" to 1
  32.   scrollByLine(member "list", y - 1)
  33.   if y = 0 then
  34.     nothing()
  35.   else
  36.     hilite line y of field "list"
  37.     set theWord to word y of field "list"
  38.     set newPicName to getaProp(pictureList, theWord)
  39.     puppetSprite(36, 1)
  40.     set the member of sprite 36 to member newPicName
  41.     set newMovieName to getaProp(movieList, theWord)
  42.     set newFrame to getaProp(frameList, theWord)
  43.   end if
  44. end
  45.  
  46. on mouseUp
  47.   set theLine to the mouseLine
  48.   set theField to the mouseCast
  49.   set theWord to word theLine of field "list"
  50.   if (theLine > 0) and (theField > 0) then
  51.     hilite line theLine of field theField
  52.     set newPicName to getaProp(pictureList, theWord)
  53.     puppetSprite(36, 1)
  54.     set the member of sprite 36 to member newPicName
  55.     set newMovieName to getaProp(movieList, theWord)
  56.     set newFrame to getaProp(frameList, theWord)
  57.   end if
  58. end
  59.  
  60. on goMovie
  61.   set gFrameLabel to newFrame
  62.   tell the stage
  63.     go(newFrame, newMovieName)
  64.   end tell
  65. end
  66.