# Moving an object created with drawing API

**URL:** <https://forum.kirupa.com/t/moving-an-object-created-with-drawing-api/297179>\
**Category:** Uncategorized\
**Created:** [September 27, 2009, 12:45am UTC](https://forum.kirupa.com/t/moving-an-object-created-with-drawing-api/297179 "2009-09-27T00:45:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Goth\_Santa](https://avatars.discourse-cdn.com/v4/letter/g/46a35a/32.png) [@Goth\_Santa](https://forum.kirupa.com/u/Goth_Santa)\
**Post date:** [September 27, 2009, 12:45am UTC](https://forum.kirupa.com/t/moving-an-object-created-with-drawing-api/297179/1 "2009-09-27T00:45:38Z")

</div>

This is one of those things that seems like it should be really simple but doesn’t work.

I’m trying to create a movieClip using the drawing API, but once I do so I can’t get it to move with ActionScipt. My code looks (basically) like this:

```auto

drawBox = function (options) {[INDENT]beginFill();
lineStyle(blah);
moveTo(blah);
lineTo(blah);
/* etc. */
[/INDENT]}

var shape = this.createEmptyMovieClip("shape1", 1);
drawBox.apply(shape1, [params]);

shape1.onEnterFrame = function () {[INDENT]this._x += 20;
[/INDENT]}

```

If I trace shape1’s x value, the number increases, but the box on the screen doesn’t actually move. What am I missing?
