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

  1. global gRollerList, gSpeciesList, gLinkRollerList, gTextCastLib, gPictList, gFrameLabel, gSpeakList, gSpeak, gFrom, gTo, gPrintText, gPrintPicture, gPrintPictureCastlib, gLanguage, gFlag
  2.  
  3. on startMovie
  4.   set the idleLoadMode to 3
  5.   set the preLoadEventAbort to 1
  6.   set gFrom to 15
  7.   set gTo to 18
  8.   set gTextCastLib to "instext"
  9.   set gPrintPictureCastlib to "ins332"
  10.   set gRollerList to [31: 11, 32: 11, 33: 11, 34: member 21 of castLib "shared", 35: member 22 of castLib "shared", 36: member 23 of castLib "shared", 37: member 24 of castLib "shared", 38: member 25 of castLib "shared", 39: member 36 of castLib "shared"]
  11.   set gLinkRollerList to [15: 332, 16: 345, 17: 358, 18: 372]
  12.   if (gFrameLabel = "pic101") or voidp(gFrameLabel) then
  13.     set gSpeciesList to value(the text of field "L01")
  14.     set gPictList to value(the text of field "P01")
  15.     set gSpeakList to value(the text of field "S01")
  16.     set gSpeak to 1
  17.     set gPrintText to 101
  18.     set gFlag to 2
  19.     speak()
  20.   else
  21.     goTheSpecies()
  22.   end if
  23. end
  24.  
  25. on goPic1
  26.   cursor(4)
  27.   go(getaProp(gPictList, 1))
  28. end
  29.  
  30. on goPic2
  31.   cursor(4)
  32.   go(getaProp(gPictList, 2))
  33. end
  34.  
  35. on goPic3
  36.   cursor(4)
  37.   go(getaProp(gPictList, 3))
  38. end
  39.  
  40. on goMap
  41.   set i to integer(char 5 of gFrameLabel)
  42.   set N to integer(the last char in gFrameLabel)
  43.   case N of
  44.     "10":
  45.       set N to i * N
  46.       set k to N
  47.     "-1":
  48.       set N to (i * 10) - 1
  49.       set k to N
  50.     otherwise:
  51.       set k to (i * 10) + N
  52.   end case
  53.   if i = 0 then
  54.     do("go" && QUOTE & "maps" & i & N & QUOTE)
  55.   else
  56.     do("go" && QUOTE & "maps" & k & QUOTE)
  57.   end if
  58. end
  59.  
  60. on goClass
  61.   set i to integer(char 5 of gFrameLabel)
  62.   set N to integer(the last char in gFrameLabel)
  63.   case N of
  64.     "10":
  65.       set N to i * N
  66.       set k to N
  67.     "-1":
  68.       set N to (i * 10) - 1
  69.       set k to N
  70.     otherwise:
  71.       set k to (i * 10) + N
  72.   end case
  73.   if i = 0 then
  74.     do("go" && QUOTE & "clas" & i & N & QUOTE)
  75.   else
  76.     do("go" && QUOTE & "clas" & k & QUOTE)
  77.   end if
  78. end
  79.  
  80. on nextSpecies
  81.   puppetSound(0)
  82.   set gFlag to 1
  83.   set i to integer(char 5 of gFrameLabel)
  84.   set N to integer(the last char in gFrameLabel + 1)
  85.   case N of
  86.     "10":
  87.       if i = 0 then
  88.         set f1 to "L" & N
  89.         set f3 to "P" & N
  90.         set f4 to "S" & N
  91.         set i to 1
  92.         set k to 10
  93.       else
  94.         set N to (i + 1) * N
  95.         set f1 to "L" & N
  96.         set f3 to "P" & N
  97.         set f4 to "S" & N
  98.         set k to N
  99.       end if
  100.     otherwise:
  101.       set f1 to "L" & i & N
  102.       set f3 to "P" & i & N
  103.       set f4 to "S" & i & N
  104.       set k to (i * 10) + N
  105.   end case
  106.   set gSpeciesList to value(the text of field f1)
  107.   linkText(1, 332, 1)
  108.   set gPictList to value(the text of field f3)
  109.   cursor(4)
  110.   if i = 0 then
  111.     do("go" && QUOTE & "pic1" & i & N & QUOTE)
  112.   else
  113.     do("go" && QUOTE & "pic1" & k & QUOTE)
  114.   end if
  115.   set gSpeakList to value(the text of field f4)
  116.   set gSpeak to 1
  117.   puppetSound(0)
  118.   sound stop 1
  119.   speak()
  120. end
  121.  
  122. on previousSpecies
  123.   puppetSound(0)
  124.   set gFlag to 1
  125.   set i to integer(char 5 of gFrameLabel)
  126.   set N to integer(the last char in gFrameLabel - 1)
  127.   case N of
  128.     "-1":
  129.       set i to i - 1
  130.       set N to 9
  131.       set f1 to "L" & i & N
  132.       set f3 to "P" & i & N
  133.       set f4 to "S" & i & N
  134.       set k to (i * 10) + N
  135.     otherwise:
  136.       set f1 to "L" & i & N
  137.       set f3 to "P" & i & N
  138.       set f4 to "S" & i & N
  139.       set k to (i * 10) + N
  140.   end case
  141.   set gSpeciesList to value(the text of field f1)
  142.   linkText(1, 332, 1)
  143.   set gPictList to value(the text of field f3)
  144.   cursor(4)
  145.   if i = 0 then
  146.     do("go" && QUOTE & "pic1" & i & N & QUOTE)
  147.   else
  148.     do("go" && QUOTE & "pic1" & k & QUOTE)
  149.   end if
  150.   set gSpeakList to value(the text of field f4)
  151.   set gSpeak to 1
  152.   speak()
  153. end
  154.  
  155. on goTheSpecies
  156.   puppetSound(0)
  157.   set gFlag to 2
  158.   set i to integer(char 5 of gFrameLabel)
  159.   set N to integer(the last char in gFrameLabel)
  160.   set f1 to "L" & i & N
  161.   set f3 to "P" & i & N
  162.   set f4 to "S" & i & N
  163.   set gSpeciesList to value(the text of field f1)
  164.   linkText(1, 332, 1)
  165.   set gPictList to value(the text of field f3)
  166.   cursor(4)
  167.   do("go" && QUOTE & "pic1" & i & N & QUOTE)
  168.   set gSpeakList to value(the text of field f4)
  169.   set gSpeak to 1
  170.   speak()
  171. end
  172.  
  173. on previousLink
  174.   cursor(4)
  175.   go("inver", "main")
  176. end
  177.