home *** CD-ROM | disk | FTP | other *** search
/ CD Loisirs 26 / CDL26.iso / PICASSO / DATA / THEMES.DXR / 00043.ls < prev    next >
Encoding:
Text File  |  1996-12-09  |  2.9 KB  |  131 lines

  1. on exitFrame
  2.   global g_soundcast, g_decompte, g_memtime, numecran, nbecran, nomtheme, g_visite, gCurseurDoigt
  3.   if soundBusy(1) = 0 then
  4.     if g_decompte = 0 then
  5.       set g_memtime to the timer
  6.       set g_decompte to 1
  7.     else
  8.       if the timer >= (g_memtime + (60 * 15)) then
  9.         set g_decompte to 0
  10.         puppetSound("S" & nomtheme & ".aiff")
  11.       end if
  12.     end if
  13.   end if
  14.   puppetSprite(12, 1)
  15.   if rollOver(12) then
  16.     if (nomtheme = "G") and (numecran = 0) then
  17.       set the castNum of sprite 12 to 38
  18.     else
  19.       set the castNum of sprite 12 to 25
  20.     end if
  21.   else
  22.     if (nomtheme = "G") and (numecran = 0) then
  23.       set the castNum of sprite 12 to 82
  24.     else
  25.       set the castNum of sprite 12 to 56
  26.     end if
  27.   end if
  28.   puppetSprite(13, 1)
  29.   if rollOver(13) then
  30.     if (nomtheme = "G") and (numecran = 0) then
  31.       set the castNum of sprite 13 to 39
  32.     else
  33.       set the castNum of sprite 13 to 26
  34.     end if
  35.   else
  36.     if (nomtheme = "G") and (numecran = 0) then
  37.       set the castNum of sprite 13 to 83
  38.     else
  39.       set the castNum of sprite 13 to 57
  40.     end if
  41.   end if
  42.   puppetSprite(14, 1)
  43.   if rollOver(14) then
  44.     if (nomtheme = "G") and (numecran = 0) then
  45.       set the castNum of sprite 14 to 40
  46.     else
  47.       set the castNum of sprite 14 to 27
  48.     end if
  49.   else
  50.     if (nomtheme = "G") and (numecran = 0) then
  51.       set the castNum of sprite 14 to 84
  52.     else
  53.       set the castNum of sprite 14 to 58
  54.     end if
  55.   end if
  56.   if rollOver(12) or rollOver(13) or rollOver(14) then
  57.     cursor(gCurseurDoigt)
  58.   else
  59.     cursor(-1)
  60.   end if
  61.   go(the frame)
  62. end
  63.  
  64. on mouseUp
  65.   global numecran, nbecran, g_index, g_call_param, g_exit
  66.   cursor(-1)
  67.   if rollOver(12) then
  68.     puppetSprite(12, 0)
  69.     puppetSprite(13, 0)
  70.     puppetSprite(14, 0)
  71.     if numecran > 0 then
  72.       set numecran to numecran - 1
  73.       go("theme")
  74.     else
  75.       puppetSound(0)
  76.       if g_index = 1 then
  77.         set g_exit to 0
  78.         set g_call_param to -1
  79.         unpuppet()
  80.         go("sortie")
  81.       else
  82.         go("entree")
  83.       end if
  84.     end if
  85.   end if
  86.   if rollOver(13) then
  87.     puppetSprite(12, 0)
  88.     puppetSprite(13, 0)
  89.     puppetSprite(14, 0)
  90.     puppetSprite(3, 0)
  91.     puppetSound(0)
  92.     if g_index = 1 then
  93.       set g_exit to 0
  94.       set g_call_param to -1
  95.       unpuppet()
  96.       go("sortie")
  97.     else
  98.       go("entree")
  99.     end if
  100.   end if
  101.   if rollOver(14) then
  102.     puppetSprite(12, 0)
  103.     puppetSprite(13, 0)
  104.     puppetSprite(14, 0)
  105.     if numecran < (nbecran - 1) then
  106.       set numecran to numecran + 1
  107.       go("theme")
  108.     else
  109.       puppetSound(0)
  110.       if g_index = 1 then
  111.         set g_exit to 0
  112.         set g_call_param to -1
  113.         unpuppet()
  114.         go("sortie")
  115.       else
  116.         go("entree")
  117.       end if
  118.     end if
  119.   end if
  120. end
  121.  
  122. on mouseDown
  123.   global g_visite, g_call_param, g_exit
  124.   if g_visite = 1 then
  125.     set g_call_param to -1
  126.     set g_exit to 0
  127.     unpuppet()
  128.     go("sortie")
  129.   end if
  130. end
  131.