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

  1. on mouseDown
  2.   global carteldisegni, QEsercizio, voce, Lingua, altezza, larghezza
  3.   set altezza to the mouseV
  4.   set larghezza to the mouseH
  5.   set voce to Lingua & 7
  6.   voce()
  7.   set QEsercizio to random(2)
  8.   if soundBusy(1) then
  9.     sound stop 1
  10.   end if
  11.   pigia()
  12.   nascondi()
  13.   set the visible of sprite 3 to 1
  14.   repeat with n = 25 to 26
  15.     set the moveableSprite of sprite n to 0
  16.   end repeat
  17.   set x to random(3)
  18.   repeat while x = carteldisegni
  19.     set x to random(3)
  20.   end repeat
  21.   set carteldisegni to x
  22.   repeat with n = 24 to 26
  23.     puppetSprite(n, 1)
  24.   end repeat
  25.   set the memberNum of sprite 24 to 44 + carteldisegni
  26.   set y to random(2)
  27.   if carteldisegni = 1 then
  28.     set the memberNum of sprite 25 to 46 + (y * 2)
  29.     set the loc of sprite 25 to point(429, 142)
  30.     set the memberNum of sprite 26 to 46 + (y * 2) + 1
  31.     set the loc of sprite 26 to point(430, 263)
  32.   end if
  33.   if carteldisegni = 2 then
  34.     set the memberNum of sprite 25 to 50 + (y * 2)
  35.     set the loc of sprite 25 to point(372, 310)
  36.     set the memberNum of sprite 26 to 50 + (y * 2) + 1
  37.     set the loc of sprite 26 to point(436, 310)
  38.   end if
  39.   if carteldisegni = 3 then
  40.     set the memberNum of sprite 25 to 54 + (y * 2)
  41.     set the loc of sprite 25 to point(372, 310)
  42.     set the memberNum of sprite 26 to 54 + (y * 2) + 1
  43.     set the loc of sprite 26 to point(436, 310)
  44.   end if
  45.   set the visible of sprite 24 to 1
  46.   updateStage()
  47.   repeat with n = 25 to 26
  48.     set the visible of sprite n to 1
  49.     set the moveableSprite of sprite n to 1
  50.   end repeat
  51.   updateStage()
  52.   Chiamaoggetti()
  53. end
  54.  
  55. on Chiamaoggetti
  56.   global QEsercizio, pOggetti, voce, Lingua, carteldisegni
  57.   set voce to Lingua & 7
  58.   voce()
  59.   tieni()
  60.   if QEsercizio = 1 then
  61.     set pippo to the memberNum of sprite 25
  62.     set pOggetti to the name of member pippo
  63.   else
  64.     set pippo to the memberNum of sprite 26
  65.     set pOggetti to the name of member pippo
  66.   end if
  67.   Oggetto()
  68.   tieni()
  69.   set voce to Lingua & carteldisegni & "A"
  70.   voce()
  71.   tieni()
  72.   if QEsercizio = 1 then
  73.     set pippo to the memberNum of sprite 26
  74.     set pOggetti to the name of member pippo
  75.   else
  76.     set pippo to the memberNum of sprite 25
  77.     set pOggetti to the name of member pippo
  78.   end if
  79.   Oggetto()
  80.   tieni()
  81.   set voce to Lingua & carteldisegni & "B"
  82.   voce()
  83.   tieni()
  84. end
  85.