home *** CD-ROM | disk | FTP | other *** search
/ Cani & Cani / CANI.ISO / pc / program / bd.dxr / Scripts_41.ls < prev    next >
Encoding:
Text File  |  1997-11-11  |  4.6 KB  |  168 lines

  1. on exitFrame
  2.   global NoResField, NResField, gFlagFiche
  3.   set V1 to getAt(NoResField, 1)
  4.   set V2 to getAt(NoResField, 2)
  5.   if V2 < NResField then
  6.     set the visible of sprite 28 to 1
  7.     set the visible of sprite 30 to 1
  8.     ControlRollOver(1, 30, 121, 0)
  9.   else
  10.     set the visible of sprite 28 to 0
  11.     set the visible of sprite 30 to 0
  12.   end if
  13.   if V1 > 1 then
  14.     set the visible of sprite 27 to 1
  15.     set the visible of sprite 29 to 1
  16.     ControlRollOver(1, 29, 121, 0)
  17.   else
  18.     set the visible of sprite 27 to 0
  19.     set the visible of sprite 29 to 0
  20.   end if
  21.   if gFlagFiche = 1 then
  22.     MiseAjour()
  23.   end if
  24.   DogFieldRollOver(20, 21)
  25.   NavigNoDog()
  26.   go(the frame)
  27. end
  28.  
  29. on mouseDown
  30.   set the constraint of sprite 12 to 4
  31.   set the constraint of sprite 13 to 5
  32.   set the constraint of sprite 14 to 6
  33.   set the constraint of sprite 15 to 7
  34. end
  35.  
  36. on mouseUp
  37.   global listeSearch
  38.   set NoCrit to 0
  39.   set NoSprite to the clickOn
  40.   case NoSprite of
  41.     12:
  42.       DragCursor(12, 2)
  43.     13:
  44.       DragCursor(13, 3)
  45.     14:
  46.       DragCursor(14, 1)
  47.     15:
  48.       DragCursor(15, 4)
  49.     8:
  50.       ClickCursor(12, 2)
  51.     9:
  52.       ClickCursor(13, 3)
  53.     10:
  54.       ClickCursor(14, 1)
  55.     11:
  56.       ClickCursor(15, 4)
  57.   end case
  58. end
  59.  
  60. on DragCursor NoSprite, NoCrit
  61.   set ZoneH to the locH of sprite NoSprite
  62.   ZoneCursor(ZoneH, NoSprite, NoCrit)
  63. end
  64.  
  65. on ClickCursor NoSprite, NoCrit
  66.   set ZoneH to the mouseH
  67.   set the locH of sprite NoSprite to ZoneH
  68.   updateStage()
  69.   ZoneCursor(ZoneH, NoSprite, NoCrit)
  70. end
  71.  
  72. on ZoneCursor ZoneH, NoSprite, NoCrit
  73.   if NoCrit <> 0 then
  74.     set NoTrait to 16 + NoCrit - 1
  75.     set NoTrait0 to 23 + NoCrit - 1
  76.     if ZoneH < 133 then
  77.       set the locH of sprite NoSprite to 82
  78.       set the visible of sprite NoTrait0 to 1
  79.       set the visible of sprite NoTrait to 0
  80.       setaProp(listeSearch, NoCrit, 0)
  81.     else
  82.       if (ZoneH >= 133) and (ZoneH < 219) then
  83.         set the locH of sprite NoSprite to 173
  84.         set the locH of sprite NoTrait to 133
  85.         setaProp(listeSearch, NoCrit, 1)
  86.         set the visible of sprite NoTrait0 to 0
  87.         set the visible of sprite NoTrait to 1
  88.       else
  89.         if (ZoneH >= 219) and (ZoneH < 305) then
  90.           set the locH of sprite NoSprite to 259
  91.           set the locH of sprite NoTrait to 219
  92.           setaProp(listeSearch, NoCrit, 2)
  93.           set the visible of sprite NoTrait0 to 0
  94.           set the visible of sprite NoTrait to 1
  95.         else
  96.           if (ZoneH >= 305) and (ZoneH < 391) then
  97.             set the locH of sprite NoSprite to 346
  98.             set the locH of sprite NoTrait to 305
  99.             setaProp(listeSearch, NoCrit, 3)
  100.             set the visible of sprite NoTrait0 to 0
  101.             set the visible of sprite NoTrait to 1
  102.           else
  103.             if ZoneH >= 391 then
  104.               set the locH of sprite NoSprite to 431
  105.               set the locH of sprite NoTrait to 391
  106.               setaProp(listeSearch, NoCrit, 4)
  107.               set the visible of sprite NoTrait0 to 0
  108.               set the visible of sprite NoTrait to 1
  109.             end if
  110.           end if
  111.         end if
  112.       end if
  113.     end if
  114.     updateStage()
  115.     Multicritere()
  116.     if the text of field "RESULTAT1" < "A" then
  117.       put " " into field "RESULTAT1"
  118.       put "Aucun chien ne r√©pond √† votre recherche" into field "RESULTAT3"
  119.     end if
  120.   end if
  121. end
  122.  
  123. on MiseAjour
  124.   global listeSearch
  125.   set Sprite_Critere to [2, 3, 1, 4]
  126.   repeat with i = 1 to 4
  127.     set NoSprite to 12 + i - 1
  128.     set J to getaProp(Sprite_Critere, i)
  129.     set ZoneH to getaProp(listeSearch, J)
  130.     set NoTrait to 16 + J - 1
  131.     set NoTrait0 to 23 + J - 1
  132.     if ZoneH = 0 then
  133.       set the locH of sprite NoSprite to 82
  134.       set the visible of sprite NoTrait0 to 1
  135.       set the visible of sprite NoTrait to 0
  136.       next repeat
  137.     end if
  138.     if ZoneH = 1 then
  139.       set the locH of sprite NoSprite to 173
  140.       set the locH of sprite NoTrait to 133
  141.       set the visible of sprite NoTrait0 to 0
  142.       set the visible of sprite NoTrait to 1
  143.       next repeat
  144.     end if
  145.     if ZoneH = 2 then
  146.       set the locH of sprite NoSprite to 259
  147.       set the locH of sprite NoTrait to 219
  148.       set the visible of sprite NoTrait0 to 0
  149.       set the visible of sprite NoTrait to 1
  150.       next repeat
  151.     end if
  152.     if ZoneH = 3 then
  153.       set the locH of sprite NoSprite to 346
  154.       set the locH of sprite NoTrait to 305
  155.       set the visible of sprite NoTrait0 to 0
  156.       set the visible of sprite NoTrait to 1
  157.       next repeat
  158.     end if
  159.     if ZoneH = 4 then
  160.       set the locH of sprite NoSprite to 431
  161.       set the locH of sprite NoTrait to 391
  162.       set the visible of sprite NoTrait0 to 0
  163.       set the visible of sprite NoTrait to 1
  164.     end if
  165.   end repeat
  166.   updateStage()
  167. end
  168.