home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 41 / MOBICLIC41.ISO / pc / Data / Sommaire.dir / 00063_Script_63 < prev    next >
Text File  |  2002-02-07  |  2KB  |  68 lines

  1. --Detection de position de souris pour yeux
  2. property spriteNum, LaPiste, LeNom, LaLocH, LaLocV
  3.  
  4. -----------------------
  5. on beginSprite me
  6.   --  numero = me.spriteNum
  7.   LaLocH = the locH of sprite(spritenum)
  8.   LaLocV = the locV of sprite(spritenum)
  9.   LaPiste = sprite(spriteNum)
  10. --  LeNom = LaPiste.member.name
  11.     LeNom=member(spritenum).name
  12. end beginSprite
  13.  
  14. on exitframe
  15.   if the mouseH<(LaLocH-20) then
  16.     -- on est α gauche
  17.     if the mouseV>(LaLocV-15) and the mouseV<(LaLocV+15) then
  18.       LaPiste.member = "G"
  19.     else
  20.       if the mouseV>(LaLocV+15) then
  21.         LaPiste.member = "BG"
  22.       else
  23.         if the mouseV<(LaLocV-15) then
  24.           LaPiste.member = "HG"
  25.         end if
  26.       end if
  27.     end if
  28.     
  29.   else
  30.     -- on est au centre
  31.     if the mouseH>(LaLocH-20) and the mouseh<(LaLocH+20) then
  32.       -- on est trΦs haut
  33.       if the mouseV<(LaLocV-30) then
  34.         LaPiste.member = "H"
  35.       else
  36.         if the mouseV<(LaLocV-10) then
  37.           LaPiste.member = "LH"
  38.         else
  39.           if the mouseV>(LaLocV+30) then
  40.             LaPiste.member = "B"
  41.           else
  42.             if the mousev>(LaLocV+10) then
  43.               LaPiste.member = "LB"
  44.             else
  45.               LaPiste.member = "LN"
  46.             end if
  47.           end if
  48.         end if
  49.       end if
  50.       
  51.     else
  52.       -- on est α droite
  53.       if the mouseV<(LaLocV+15) and the mouseV>(LaLocV-15) then
  54.         LaPiste.member = "D"
  55.       else
  56.         if the mouseV>(LaLocV+15) then
  57.           LaPiste.member = "BD"
  58.         else
  59.           if the mouseV<(LaLocV-15) then
  60.             LaPiste.member = "HD"
  61.           end if
  62.         end if
  63.       end if
  64.     end if
  65.   end if
  66. end
  67.  
  68. -----------------------