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

  1. global gCameraList, gCount, gString, newPicName
  2.  
  3. on startMovie
  4.   alert("Laita pelilevyke(Tapaus Luonto) levyasemaan ja valitse levykkeelt√§ filmirullan nimi.")
  5.   if the machineType = 256 then
  6.     openXLib("fileio.dll")
  7.     if objectp(readObject) then
  8.       readObject(mdispose)
  9.     end if
  10.     set readObject to fileio(mnew, "?read", "TXT")
  11.     if readObject = -43 then
  12.       forget(window "camera")
  13.       exit
  14.     end if
  15.     set gString to readObject(mReadLine)
  16.     readObject(mdispose)
  17.     closeXLib("fileio.dll")
  18.   end if
  19.   if the machineType <> 256 then
  20.     if objectp(readObject) then
  21.       readObject(mdispose)
  22.     end if
  23.     set readObject to fileio(mnew, "?read", "TXT")
  24.     if readObject = -43 then
  25.       forget(window "camera")
  26.       exit
  27.     end if
  28.     set gString to readObject(mReadToken, EMPTY, "]")
  29.     readObject(mdispose)
  30.   end if
  31.   if not (gString contains "pic") or (voidp(gString) = 1) then
  32.     alert("T√§ss√§ tiedostossa ei ole kuvia!")
  33.     forget(window "camera")
  34.   else
  35.     put EMPTY into field "list"
  36.     put gString into field "text"
  37.     set gCameraList to value(the text of field "text")
  38.     set gCount to count(gCameraList)
  39.     repeat with x = 1 to gCount
  40.       put "kuva" && x & RETURN after field "list"
  41.     end repeat
  42.     hilite line 1 of field "list"
  43.     set newPicName to getAt(gCameraList, 1)
  44.     set the media of member 11 to the media of member newPicName
  45.     set the palette of member 11 to 604
  46.   end if
  47. end
  48.