Returns

hi there … I am trying to work with returns …

I have class which I want to return a position to the function that calls it in my document class.
Avoid is a class with a static function CheckObjects inside it - which takes the object from myObj Array - which is a sprite on stage.

//function CheckObjects(obj:Object){
tgtX = obj.x;
return tgtX;
}

So now in my doc class - i want to use the return value …

Avoid.CheckObjects(myObj[0]));
// urmm trace(tgtX); ?? says it hasnt been initiated ..

ps! not full code of course … just to get the idea …
Anyone out there who can help!? THANKS