home *** CD-ROM | disk | FTP | other *** search
/ Picasso Un Homme, Une Oeuvre, Une Légende / PICASSO.ISO / data / accueil.dxr / 00002.ls < prev    next >
Encoding:
Text File  |  1996-09-16  |  3.6 KB  |  144 lines

  1. on enterFrame
  2.   global g_memEntry, g_memlocH
  3.   if (g_memEntry = 1) and (voidp(g_memlocH) = 0) then
  4.     repeat with i = 0 down to g_memlocH
  5.       set the locH of sprite 4 to i
  6.       updateStage()
  7.       set i to i + (g_memlocH / 20)
  8.     end repeat
  9.     set the locH of sprite 4 to g_memlocH
  10.     updateStage()
  11.   end if
  12.   set g_memEntry to 0
  13. end
  14.  
  15. on exitFrame
  16.   global g_detect_zone, g_selected, gCurseurDoigt, gCurseurMainUp, gOwnPlayList, gStitchCast
  17.   set gOwnPlayList to []
  18.   set curcur to -1
  19.   set pt to point(the mouseH, the mouseV)
  20.   set orgx to the locH of sprite 4
  21.   set orgy to the locV of sprite 4
  22.   if the mouseCast = gStitchCast then
  23.     set curcur to gCurseurMainUp
  24.     repeat with i = 1 to 17
  25.       set r to offset(getAt(g_detect_zone, i), orgx, orgy)
  26.       if inside(pt, r) then
  27.         set g_selected to i
  28.         puppetSprite(9, 1)
  29.         set the castNum of sprite 9 to member ("Titre_" & i & ".RTF")
  30.         set the locH of sprite 9 to 17
  31.         set the locV of sprite 9 to 40
  32.         set curcur to gCurseurDoigt
  33.         exit repeat
  34.       end if
  35.     end repeat
  36.     if i > 17 then
  37.       set g_selected to 0
  38.       puppetSprite(9, 0)
  39.     end if
  40.   else
  41.     set g_select to 0
  42.     puppetSprite(9, 0)
  43.   end if
  44.   if rollOver(7) then
  45.     set curcur to gCurseurDoigt
  46.   end if
  47.   if rollOver(8) then
  48.     set curcur to gCurseurDoigt
  49.   end if
  50.   if rollOver(47) then
  51.     set curcur to gCurseurMainUp
  52.   end if
  53.   cursor(curcur)
  54.   go(the frame)
  55. end
  56.  
  57. on mouseDown
  58.   global g_selected, gCurseurFlecheDroite, gCurseurFlecheGauche, gCurseurMainDown, was_scrolling, gStitchCast
  59.   if the mouseCast = gStitchCast then
  60.     set was_scrolling to 1
  61.     cursor(gCurseurMainDown)
  62.     set orgx to the mouseH
  63.     repeat while the mouseH = orgx
  64.       if the mouseDown = 0 then
  65.         exit
  66.       end if
  67.     end repeat
  68.     set g_selected to 0
  69.     repeat while the mouseDown = 1
  70.       set x to the mouseH
  71.       if x < orgx then
  72.         rightscroll(orgx - x)
  73.         cursor(gCurseurFlecheGauche)
  74.       else
  75.         if x > orgx then
  76.           leftscroll(x - orgx)
  77.           cursor(gCurseurFlecheDroite)
  78.         else
  79.           cursor(gCurseurMainDown)
  80.         end if
  81.       end if
  82.       updateStage()
  83.     end repeat
  84.   else
  85.     set was_scrolling to 0
  86.     set g_selected to 0
  87.   end if
  88. end
  89.  
  90. on mouseUp
  91.   global g_selected, gPathBoot, g_memlocH, was_scrolling, g_call_param, g_exit, g_next_movie
  92.   set g_memlocH to the locH of sprite 4
  93.   if g_selected <> 0 then
  94.     put "clic oeuvre " && g_selected
  95.     set g_call_param to -1
  96.     set g_exit to 1
  97.     puppetSprite(4, 0)
  98.     if the machineType = 256 then
  99.       set g_next_movie to gPathBoot & "jingles\" & numToChar(64 + g_selected)
  100.     else
  101.       set g_next_movie to gPathBoot & "jingles:" & numToChar(64 + g_selected)
  102.     end if
  103.     unpuppet()
  104.     go("sortie")
  105.     exit
  106.   end if
  107.   if was_scrolling = 0 then
  108.     if rollOver(7) then
  109.       set g_call_param to -1
  110.       set g_exit to 1
  111.       set g_next_movie to gPathBoot & "themes"
  112.       unpuppet()
  113.       go("sortie")
  114.       exit
  115.     end if
  116.     if rollOver(8) then
  117.       set g_call_param to -1
  118.       set g_exit to 1
  119.       set g_next_movie to gPathBoot & "visite"
  120.       unpuppet()
  121.       go("sortie")
  122.       exit
  123.     end if
  124.   end if
  125. end
  126.  
  127. on leftscroll speed
  128.   set speed to speed / 5
  129.   if (the right of sprite 4 - speed) < 541 then
  130.     set speed to the right of sprite 4 - 541
  131.   end if
  132.   set xp to the locH of sprite 4
  133.   set the locH of sprite 4 to xp - speed
  134. end
  135.  
  136. on rightscroll speed
  137.   set speed to speed / 5
  138.   if (the locH of sprite 4 + speed) > 0 then
  139.     set speed to -(the locH of sprite 4)
  140.   end if
  141.   set xp to the locH of sprite 4
  142.   set the locH of sprite 4 to xp + speed
  143. end
  144.