home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 41
/
MOBICLIC41.ISO
/
pc
/
Data
/
Sommaire.dir
/
00063_Script_63
< prev
next >
Wrap
Text File
|
2002-02-07
|
2KB
|
68 lines
--Detection de position de souris pour yeux
property spriteNum, LaPiste, LeNom, LaLocH, LaLocV
-----------------------
on beginSprite me
-- numero = me.spriteNum
LaLocH = the locH of sprite(spritenum)
LaLocV = the locV of sprite(spritenum)
LaPiste = sprite(spriteNum)
-- LeNom = LaPiste.member.name
LeNom=member(spritenum).name
end beginSprite
on exitframe
if the mouseH<(LaLocH-20) then
-- on est α gauche
if the mouseV>(LaLocV-15) and the mouseV<(LaLocV+15) then
LaPiste.member = "G"
else
if the mouseV>(LaLocV+15) then
LaPiste.member = "BG"
else
if the mouseV<(LaLocV-15) then
LaPiste.member = "HG"
end if
end if
end if
else
-- on est au centre
if the mouseH>(LaLocH-20) and the mouseh<(LaLocH+20) then
-- on est trΦs haut
if the mouseV<(LaLocV-30) then
LaPiste.member = "H"
else
if the mouseV<(LaLocV-10) then
LaPiste.member = "LH"
else
if the mouseV>(LaLocV+30) then
LaPiste.member = "B"
else
if the mousev>(LaLocV+10) then
LaPiste.member = "LB"
else
LaPiste.member = "LN"
end if
end if
end if
end if
else
-- on est α droite
if the mouseV<(LaLocV+15) and the mouseV>(LaLocV-15) then
LaPiste.member = "D"
else
if the mouseV>(LaLocV+15) then
LaPiste.member = "BD"
else
if the mouseV<(LaLocV-15) then
LaPiste.member = "HD"
end if
end if
end if
end if
end if
end
-----------------------