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

  1. global gRollerList, gSpeciesList, gLinkRollerList, gTextCastLib, gPrintPictureCastlib, gPictList, gFrameLabel, gSpeakList, gSpeak, gFrom, gTo, gFlag
  2.  
  3. on startMovie
  4.   set the preLoadEventAbort to 0
  5.   set the idleLoadMode to 3
  6.   set gTextCastLib to "zootext"
  7.   set gPrintPictureCastlib to "zoo332"
  8.   set gFrom to 15
  9.   set gTo to 34
  10.   set gRollerList to [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, 19: 387, 20: 400, 21: 415, 22: 428, 23: 443, 24: 456]
  12.   set gSpeakList to value(the text of field "S01")
  13.   set gSpeak to 1
  14.   set gFlag to 2
  15.   speak()
  16. end
  17.  
  18. on nextSpecies
  19.   puppetSound(0)
  20.   set gFlag to 1
  21.   set i to integer(char 5 of gFrameLabel)
  22.   set N to integer(the last char in gFrameLabel + 1)
  23.   case N of
  24.     "10":
  25.       if i = 0 then
  26.         set f2 to "R" & N
  27.         set f4 to "S" & N
  28.         set i to 1
  29.         set k to 10
  30.       else
  31.         set N to (i + 1) * N
  32.         set f2 to "R" & N
  33.         set f4 to "S" & N
  34.         set k to N
  35.       end if
  36.     otherwise:
  37.       set f2 to "R" & i & N
  38.       set f4 to "S" & i & N
  39.       set k to (i * 10) + N
  40.   end case
  41.   set gLinkRollerList to value(the text of field f2)
  42.   cursor(4)
  43.   if i = 0 then
  44.     do("go" && QUOTE & "pic1" & i & N & QUOTE)
  45.   else
  46.     do("go" && QUOTE & "pic1" & k & QUOTE)
  47.   end if
  48.   set gSpeakList to value(the text of field f4)
  49.   set gSpeak to 1
  50.   puppetSound(0)
  51.   sound stop 1
  52.   speak()
  53. end
  54.  
  55. on previousSpecies
  56.   puppetSound(0)
  57.   set gFlag to 1
  58.   set i to integer(char 5 of gFrameLabel)
  59.   set N to integer(the last char in gFrameLabel - 1)
  60.   case N of
  61.     "-1":
  62.       set i to i - 1
  63.       set N to 9
  64.       set f2 to "R" & i & N
  65.       set f4 to "S" & i & N
  66.       set k to (i * 10) + N
  67.     otherwise:
  68.       set f2 to "R" & i & N
  69.       set f4 to "S" & i & N
  70.       set k to (i * 10) + N
  71.   end case
  72.   set gLinkRollerList to value(the text of field f2)
  73.   cursor(4)
  74.   if i = 0 then
  75.     do("go" && QUOTE & "pic1" & i & N & QUOTE)
  76.   else
  77.     do("go" && QUOTE & "pic1" & k & QUOTE)
  78.   end if
  79.   set gSpeakList to value(the text of field f4)
  80.   set gSpeak to 1
  81.   speak()
  82. end
  83.  
  84. on goTheSpecies
  85.   puppetSound(0)
  86.   set gFlag to 2
  87.   set i to integer(char 5 of gFrameLabel)
  88.   set N to integer(the last char in gFrameLabel)
  89.   set f2 to "R" & i & N
  90.   set f4 to "S" & i & N
  91.   set gLinkRollerList to value(the text of field f2)
  92.   cursor(4)
  93.   do("go" && QUOTE & "pic1" & i & N & QUOTE)
  94.   set gSpeakList to value(the text of field f4)
  95.   set gSpeak to 1
  96.   speak()
  97. end
  98.  
  99. on animalButton N, s
  100.   set the puppet of sprite N to 1
  101.   set H to the locH of sprite N
  102.   set V to the locV of sprite N
  103.   set the locH of sprite N to H + 2
  104.   set the locV of sprite N to V + 2
  105.   updateStage()
  106.   repeat while the mouseDown = 1
  107.     if rollOver(N) = 1 then
  108.       set the locH of sprite N to H + 2
  109.       set the locV of sprite N to V + 2
  110.       updateStage()
  111.       next repeat
  112.     end if
  113.     set the locH of sprite N to H
  114.     set the locV of sprite N to V
  115.     updateStage()
  116.   end repeat
  117.   set the locH of sprite N to H
  118.   set the locV of sprite N to V
  119.   updateStage()
  120.   set the puppet of sprite N to 0
  121.   if rollOver(N) = 1 then
  122.     set gFrameLabel to s
  123.     goTheSpecies()
  124.   end if
  125. end
  126.  
  127. on previousLink
  128.   cursor(4)
  129.   go("urban", "main")
  130. end
  131.