home *** CD-ROM | disk | FTP | other *** search
/ PC Open 10 / pcopen10.iso / aaron / dida / osserva.dxr / 00018_Assegnazioni.ls < prev    next >
Encoding:
Text File  |  1997-09-24  |  7.8 KB  |  251 lines

  1. on startMovie
  2.   global Percorso, Psuoni, Posserva, Pombre, Pcasse, Macchina, Nfile, num, qombra, finito, segno, voce, Lingua
  3.   updateStage()
  4.   nascondi()
  5.   go("luce")
  6.   set Psuoni to Percorso & "Snd" & segno
  7.   if Lingua = 0 then
  8.     set Pombre to Percorso & "Snd" & segno & "osserva" & segno & "ombre" & segno
  9.     set Pcasse to Percorso & "Snd" & segno & "osserva" & segno & "suoni" & segno
  10.     set Posserva to Percorso & "Snd" & segno & "osserva" & segno
  11.   else
  12.     set Pombre to Percorso & "Snd" & segno & "osserva" & segno & "ombre" & segno & "ing" & segno
  13.     set Pcasse to Percorso & "Snd" & segno & "osserva" & segno & "suoni" & segno & "ing" & segno
  14.     set Posserva to Percorso & "Snd" & segno & "osserva" & segno & "ing" & segno
  15.   end if
  16.   set qombra to 0
  17.   set finito to 0
  18.   set voce to Lingua & 0
  19.   voce()
  20. end
  21.  
  22. on pigia
  23.   global Psuoni
  24.   sound playFile 1, Psuoni & "click.aif"
  25. end
  26.  
  27. on Sbagliato
  28.   global Psuoni
  29.   sound playFile 1, Psuoni & "nyuk1.aif"
  30. end
  31.  
  32. on giusto
  33.   global Psuoni
  34.   sound playFile 1, Psuoni & "Evviva.aif"
  35. end
  36.  
  37. on alleluia
  38.   global Psuoni, Lingua, segno
  39.   if Lingua = 0 then
  40.     sound playFile 1, Psuoni & "stacco.aif"
  41.   else
  42.     sound playFile 1, Psuoni & "ing" & segno & "stacco.aif"
  43.   end if
  44. end
  45.  
  46. on nascondi
  47.   repeat with n = 2 to 9
  48.     set the visible of sprite n to 0
  49.   end repeat
  50.   repeat with n = 18 to 27
  51.     set the visible of sprite n to 0
  52.   end repeat
  53.   repeat with n = 28 to 42
  54.     set the visible of sprite n to 0
  55.   end repeat
  56.   updateStage()
  57. end
  58.  
  59. on pulsante
  60.   global altezza, larghezza
  61.   set altezza to the mouseV
  62.   set larghezza to the mouseH
  63.   if the stillDown then
  64.     if (larghezza > 0) and (larghezza < 75) and (altezza > 0) and (altezza < 119) then
  65.       set the visible of sprite 2 to 1
  66.       updateStage()
  67.     end if
  68.   else
  69.     set the visible of sprite 2 to 0
  70.   end if
  71. end
  72.  
  73. on mouseUp
  74.   global larghezza, altezza, ombresprite, ombreloc, qombra, finito, dovero
  75.   if qombra <> 0 then
  76.     if (altezza < 377) and (altezza > 77) then
  77.       if (larghezza < 474) and (larghezza > 346) and (qombra = 36) then
  78.         set f to getPos(ombresprite, qombra)
  79.         set a to ((f - 1) * 2) + 1
  80.         set b to ((f - 1) * 2) + 2
  81.         set c to getAt(ombresprite, 3)
  82.         set d to getAt(ombreloc, 5)
  83.         set e to getAt(ombreloc, 6)
  84.         set the loc of sprite c to point(getAt(ombreloc, a), getAt(ombreloc, b))
  85.         set the loc of sprite qombra to point(d, e)
  86.         set dovero to 0
  87.         setAt(ombresprite, 3, qombra)
  88.         setAt(ombresprite, f, c)
  89.         set the moveableSprite of sprite qombra to 0
  90.         if (ombresprite = list(37, 38, 36)) and not finito then
  91.           alleluia()
  92.           repeat with n = 36 to 38
  93.             set the moveableSprite of sprite n to 0
  94.           end repeat
  95.           set qombra to 0
  96.           set finito to 1
  97.         end if
  98.       else
  99.         if qombra = 36 then
  100.           set f to getPos(ombresprite, qombra)
  101.           set a to ((f - 1) * 2) + 1
  102.           set b to ((f - 1) * 2) + 2
  103.           set g to getAt(ombreloc, a)
  104.           set h to getAt(ombreloc, b)
  105.           set the loc of sprite qombra to point(g, h)
  106.           set dovero to 0
  107.         end if
  108.       end if
  109.       if (larghezza < 215) and (larghezza > 104) and (qombra = 37) then
  110.         set f to getPos(ombresprite, qombra)
  111.         set a to ((f - 1) * 2) + 1
  112.         set b to ((f - 1) * 2) + 2
  113.         set c to getAt(ombresprite, 1)
  114.         set d to getAt(ombreloc, 1)
  115.         set e to getAt(ombreloc, 2)
  116.         set the loc of sprite c to point(getAt(ombreloc, a), getAt(ombreloc, b))
  117.         set the loc of sprite qombra to point(d, e)
  118.         set dovero to 0
  119.         setAt(ombresprite, 1, qombra)
  120.         setAt(ombresprite, f, c)
  121.         set the moveableSprite of sprite qombra to 0
  122.         if (ombresprite = list(37, 38, 36)) and not finito then
  123.           alleluia()
  124.           repeat with n = 36 to 38
  125.             set the moveableSprite of sprite n to 0
  126.           end repeat
  127.           set qombra to 0
  128.           set finito to 1
  129.         end if
  130.       else
  131.         if qombra = 37 then
  132.           set f to getPos(ombresprite, qombra)
  133.           set a to ((f - 1) * 2) + 1
  134.           set b to ((f - 1) * 2) + 2
  135.           set g to getAt(ombreloc, a)
  136.           set h to getAt(ombreloc, b)
  137.           set the loc of sprite qombra to point(g, h)
  138.           set dovero to 0
  139.         end if
  140.       end if
  141.       if (larghezza > 215) and (larghezza < 346) and (qombra = 38) then
  142.         set f to getPos(ombresprite, qombra)
  143.         set a to ((f - 1) * 2) + 1
  144.         set b to ((f - 1) * 2) + 2
  145.         set c to getAt(ombresprite, 2)
  146.         set d to getAt(ombreloc, 3)
  147.         set e to getAt(ombreloc, 4)
  148.         set the loc of sprite c to point(getAt(ombreloc, a), getAt(ombreloc, b))
  149.         set the loc of sprite qombra to point(d, e)
  150.         set dovero to 0
  151.         setAt(ombresprite, 2, qombra)
  152.         setAt(ombresprite, f, c)
  153.         set the moveableSprite of sprite qombra to 0
  154.         if (ombresprite = list(37, 38, 36)) and not finito then
  155.           alleluia()
  156.           repeat with n = 36 to 38
  157.             set the moveableSprite of sprite n to 0
  158.           end repeat
  159.           set qombra to 0
  160.           set finito to 1
  161.         end if
  162.       else
  163.         if qombra = 38 then
  164.           set f to getPos(ombresprite, qombra)
  165.           set a to ((f - 1) * 2) + 1
  166.           set b to ((f - 1) * 2) + 2
  167.           set g to getAt(ombreloc, a)
  168.           set h to getAt(ombreloc, b)
  169.           set the loc of sprite qombra to point(g, h)
  170.           set dovero to 0
  171.         end if
  172.       end if
  173.     else
  174.       if (qombra > 35) and (qombra < 39) then
  175.         set the rect of sprite qombra to dovero
  176.         set dovero to EMPTY
  177.       end if
  178.     end if
  179.   end if
  180. end
  181.  
  182. on crocitazze
  183.   repeat with i = 28 to 35
  184.     puppetSprite(i, 1)
  185.   end repeat
  186.   set the loc of sprite 28 to point(443, 84)
  187.   set the loc of sprite 29 to point(409, 74)
  188.   set the loc of sprite 30 to point(394, 105)
  189.   set the loc of sprite 31 to point(430, 178)
  190.   set the loc of sprite 32 to point(366, 263)
  191.   set the loc of sprite 33 to point(331, 213)
  192.   set the loc of sprite 34 to point(317, 270)
  193.   set the loc of sprite 35 to point(433, 74)
  194. end
  195.  
  196. on crocidadi
  197.   repeat with i = 28 to 35
  198.     puppetSprite(i, 1)
  199.   end repeat
  200.   set the loc of sprite 28 to point(309, 168)
  201.   set the loc of sprite 29 to point(420, 121)
  202.   set the loc of sprite 30 to point(434, 173)
  203.   set the loc of sprite 31 to point(397, 237)
  204.   set the loc of sprite 32 to point(401, 133)
  205.   set the loc of sprite 33 to point(354, 151)
  206.   set the loc of sprite 34 to point(297, 195)
  207.   set the loc of sprite 35 to point(425, 149)
  208. end
  209.  
  210. on crocigente
  211.   repeat with i = 28 to 35
  212.     puppetSprite(i, 1)
  213.   end repeat
  214.   set the loc of sprite 28 to point(443, 125)
  215.   set the loc of sprite 29 to point(337, 139)
  216.   set the loc of sprite 30 to point(307, 139)
  217.   set the loc of sprite 31 to point(303, 203)
  218.   set the loc of sprite 32 to point(388, 175)
  219.   set the loc of sprite 33 to point(355, 194)
  220.   set the loc of sprite 34 to point(333, 164)
  221.   set the loc of sprite 35 to point(306, 254)
  222. end
  223.  
  224. on crocitigre
  225.   repeat with i = 28 to 35
  226.     puppetSprite(i, 1)
  227.   end repeat
  228.   set the loc of sprite 28 to point(429, 119)
  229.   set the loc of sprite 29 to point(445, 133)
  230.   set the loc of sprite 30 to point(319, 140)
  231.   set the loc of sprite 31 to point(333, 166)
  232.   set the loc of sprite 32 to point(344, 218)
  233.   set the loc of sprite 33 to point(292, 207)
  234.   set the loc of sprite 34 to point(308, 231)
  235.   set the loc of sprite 35 to point(416, 212)
  236. end
  237.  
  238. on crocitELEFONI
  239.   repeat with i = 28 to 35
  240.     puppetSprite(i, 1)
  241.   end repeat
  242.   set the loc of sprite 28 to point(376, 138)
  243.   set the loc of sprite 29 to point(376, 118)
  244.   set the loc of sprite 30 to point(374, 191)
  245.   set the loc of sprite 31 to point(297, 147)
  246.   set the loc of sprite 32 to point(353, 225)
  247.   set the loc of sprite 33 to point(326, 245)
  248.   set the loc of sprite 34 to point(405, 234)
  249.   set the loc of sprite 35 to point(436, 195)
  250. end
  251.