# Move object from another class

**URL:** <https://forum.kirupa.com/t/move-object-from-another-class/330342>\
**Category:** Uncategorized\
**Created:** [January 5, 2013, 8:24am UTC](https://forum.kirupa.com/t/move-object-from-another-class/330342 "2013-01-05T08:24:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeekTweak\_0](https://avatars.discourse-cdn.com/v4/letter/g/b5ac83/32.png) [@GeekTweak\_0](https://forum.kirupa.com/u/GeekTweak_0)\
**Post date:** [January 5, 2013, 8:24am UTC](https://forum.kirupa.com/t/move-object-from-another-class/330342/1 "2013-01-05T08:24:06Z")

</div>

So i have this one class that says this in a function for example:

```auto

public function setUp():void
{
public var newObj[0].x = 50;
}

public function moveObj(moveDist):void
{
trace("WORKING");
newObj[0].x += moveDist;
}

```

and in another class it says:

```auto

class1.moveObj(50);

```

it traces “WORKING” just fine, but the object doesnt move. Yet when i try to run \*class1.moveObj(50) \*from the same class the object was paced in, it moves the object fine. any help here? thanks.
