code is as follows :
//if megaman is = to x mouse
if(Math.round(megaman._x) == Math.round(_xmouse)) {
if(mousex == 0 || mousex == 1)
megaman.gotoAndPlay(21);
mousex = 2;
}
//if megaman is greater than x mouse
if(Math.round(megaman._x) > Math.round(_xmouse)){
megaman._x = megaman._x -5;
if(mousex == 1 || mousex == 2)
megaman.gotoAndPlay(67);
mousex = 0;
}
//if megaman is less than x mouse
if(Math.round(megaman._x) < Math.round(_xmouse)){
megaman._x = megaman._x +5;
if(mousex == 0 || mousex == 2)
megaman.gotoAndPlay(53);
mousex = 1;
}
now heres where the problem comes in, say my mouse is at 5 and megaman is at 5, if i move my mouse to 4, megaman is now greater than my mouse (if megaman is > _xmouse) however, megaman can not move, because i told him to move -5(megaman._x = megaman._x - 5;) if he move negative 5 he is now less than 5 and not equal to( -5 + 4 = -1), so he just doesn't move at all. plz help, thx in advance.