is it a side scroller? or is it like a top view rpg type thing… or is it like an up and down scroller… that depends on the distance you gotta check… if its just the x, just the y, or the x and y…

if its side scroller do

distance = Math.abs(guyX - badguX);

if its top scroller do

distance = Math.abs(guyY - badguyY);

and if its like anywhere on the stage its the distance formula (thanks geometry) hehe * had to look this up btw… didnt remember from last year haha *

distance = Math.sqrt Math.pow((guyX - badguyX),2) + Math.pow((guyY - badguyY),2));

i think… haha

if i got that wrong the formula is

d = sqrt( (x2 - x1)^2 + (y2 - y1)^2)