Hello,
Il faut utiliser les conditions
Voici les conditions, si la position de ton infobulle est :
- _x inferieur a 0 -> on positionne l'infobulle a 0;
- _x superieur a la largeur de la scene -> on positionne l' infobulle a Stage.width;
- _y inferieur a 0 -> on positionne l' infobulle a 0;
- _y superieur a la hauteur de la scene -> on positionne l' infobulle a Stage.height;
this.onMouseMove = function(){
mc_info._x = _xmouse;
mc_info._y = _ymouse;
if(mc_info._x < 0)
{
mc_info._x = 0;
}
if(mc_info._x > Stage.width)
{
mc_info._x = Stage.width;
}
if(mc_info._y < 0)
{
mc_info._y = 0;
}
if(mc_info._y > Stage.height)
{
mc_info._y = Stage.height;
}
}-- Orange73 --"L'homme n'est pas fait pour travailler, la preuve c'est que cela le fatigue" (Voltaire)
