# Changing location of movieclip with one line of code?

**URL:** <https://forum.kirupa.com/t/changing-location-of-movieclip-with-one-line-of-code/329245>\
**Category:** flash\
**Created:** [August 6, 2012, 12:56am UTC](https://forum.kirupa.com/t/changing-location-of-movieclip-with-one-line-of-code/329245 "2012-08-06T00:56:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![John4213](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@John4213](https://forum.kirupa.com/u/John4213)\
**Post date:** [August 6, 2012, 12:56am UTC](https://forum.kirupa.com/t/changing-location-of-movieclip-with-one-line-of-code/329245/1 "2012-08-06T00:56:41Z")

</div>

Hi, I’m trying to work out how to move the location of an object with just one line of code, to move the location of a movieclip named “ball” I would do:

```auto

ball.x = 100;
ball.y = 100;

```

But I was wondering if there is a way to just call the object “ball” and move the X and Y on the same line? I thought it may be something like:

```auto
ball{x=100, y=100}

```

But that just moves the stage’s X and Y location unfortunately. Thanks if you can point me in the right direction. 😉 (Sorry if the title was misleading, I’m not sure what the technical terms would be.)
