home *** CD-ROM | disk | FTP | other *** search
/ The VPRO Digital Guide 1994 / vpro.iso / vpro1 / md.dir / 00007_localMain.ls < prev    next >
Encoding:
Text File  |  1994-08-28  |  3.8 KB  |  144 lines

  1. on LocalStartMovie
  2.   global stopState, soundPathName, R1Sounds, R2Sounds, R3Sounds, R4Sounds, R5Sounds, gFlash, gTheMatches, PartOneDone
  3.   set R1Sounds to the text of cast "Radio1Sounds"
  4.   set R2Sounds to the text of cast "Radio2Sounds"
  5.   set R3Sounds to the text of cast "Radio3Sounds"
  6.   set R4Sounds to the text of cast "Radio4Sounds"
  7.   set R5Sounds to the text of cast "Radio5Sounds"
  8.   set gTheMatches to the text of cast "TheMatches"
  9.   set soundPathName to "VPRO:VPRO1:"
  10.   set stopState to 0
  11.   showItems(0)
  12.   set PartOneDone to 0
  13.   repeat with i = 1 to 5
  14.     put string(random(10) + 5) & "," after gFlash
  15.   end repeat
  16.   delete char length(gFlash) of gFlash
  17. end
  18.  
  19. on SpecialNavigation
  20.   global Char3, stopState
  21.   set stopState to 0
  22.   puppetSound(0)
  23.   if soundBusy(1) then
  24.     sound stop 1
  25.   end if
  26.   if Char3 = "3" then
  27.     HideRandoms()
  28.   end if
  29.   repeat with count = 7 to 9
  30.     if Char3 = "2" then
  31.       set the visible of sprite count to 0
  32.       next repeat
  33.     end if
  34.     set the visible of sprite count to 1
  35.   end repeat
  36. end
  37.  
  38. on getMyText theVidName
  39.   global gTheMatches
  40.   if theVidName contains ".mov" then
  41.     delete char 9 to 12 of theVidName
  42.   end if
  43.   repeat with i = 1 to the number of lines in gTheMatches
  44.     if item 1 of line i of gTheMatches = theVidName then
  45.       return item 2 of line i of gTheMatches
  46.     end if
  47.   end repeat
  48. end
  49.  
  50. on checkMatches
  51.   global gTheMatches
  52.   repeat with i = 1 to the number of lines in gTheMatches
  53.     set temp to line i of gTheMatches
  54.     if the number of items in temp = 2 then
  55.       set tekstNaam to item 2 of temp
  56.     end if
  57.   end repeat
  58. end
  59.  
  60. on showItems theValue
  61.   repeat with i = 11 to 27
  62.     set the visible of sprite i to theValue
  63.   end repeat
  64. end
  65.  
  66. on flashItems startSprite, endSprite
  67.   repeat with i = startSprite to endSprite
  68.     if the ink of sprite i = 5 then
  69.       set the ink of sprite i to 0
  70.       next repeat
  71.     end if
  72.     set the ink of sprite i to 5
  73.   end repeat
  74.   updateStage()
  75. end
  76.  
  77. on playMySound
  78.   global soundPathName, R1Sounds, R2Sounds, R3Sounds, R4Sounds, R5Sounds
  79.   set soundNumber to the clickOn - 10
  80.   if the frame < label("MD102") then
  81.     set theSound to line soundNumber of R1Sounds
  82.   else
  83.     if the frame < label("MD103") then
  84.       set theSound to line soundNumber of R2Sounds
  85.     else
  86.       if the frame < label("MD104") then
  87.         set theSound to line soundNumber of R3Sounds
  88.       else
  89.         if the frame < label("MD105") then
  90.           set theSound to line soundNumber of R4Sounds
  91.         else
  92.           set theSound to line soundNumber of R5Sounds
  93.         end if
  94.       end if
  95.     end if
  96.   end if
  97.   set theFullSoundPath to soundPathName & char 1 to 2 of theSound & "audio:" & theSound
  98.   put theSound
  99.   sound playFile 1, theFullSoundPath
  100. end
  101.  
  102. on playStationCall number
  103.   set theCall to "VPROMR" & string(number) & "CorGalis"
  104.   puppetSound(theCall)
  105. end
  106.  
  107. on flashEm spritelist
  108.   global gFlash
  109.   repeat with i = 1 to length(spritelist)
  110.     if value(item i of gFlash) < 1 then
  111.       set newCast to the name of cast the castNum of sprite value(char i of spritelist) & ".inv"
  112.       set the castNum of sprite value(char i of spritelist) to the number of cast newCast
  113.       updateStage()
  114.       put string(random(10) + 5) into item i of gFlash
  115.       next repeat
  116.     end if
  117.     put string(value(item i of gFlash) - 1) into item i of gFlash
  118.   end repeat
  119. end
  120.  
  121. on goSubject where
  122.   go(where)
  123. end
  124.  
  125. on showGadgets which
  126.   global gLastSprite
  127.   if which = 0 then
  128.     repeat with i = 4 to 8
  129.       set the visible of sprite i to 0
  130.       puppetSprite(i, 0)
  131.     end repeat
  132.   else
  133.     set the visible of sprite gLastSprite to 1
  134.     puppetSprite(gLastSprite, 0)
  135.     set gLastSprite to gLastSprite + 1
  136.     if gLastSprite > 8 then
  137.       set gLastSprite to 4
  138.     end if
  139.     set the visible of sprite gLastSprite to 1
  140.     puppetSprite(gLastSprite, 1)
  141.     set the ink of sprite gLastSprite to 2
  142.   end if
  143. end
  144.