# Returns

**URL:** <https://forum.kirupa.com/t/returns/323091>\
**Category:** Uncategorized\
**Created:** [June 16, 2011, 2:22pm UTC](https://forum.kirupa.com/t/returns/323091 "2011-06-16T14:22:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [June 16, 2011, 2:22pm UTC](https://forum.kirupa.com/t/returns/323091/1 "2011-06-16T14:22:34Z")

</div>

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.

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

```

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

```auto
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
