# Drawing api question

**URL:** https://forum.kirupa.com/t/drawing-api-question/215833
**Category:** Uncategorized
**Created:** [February 11, 2007, 1:36am UTC](https://forum.kirupa.com/t/drawing-api-question/215833 "2007-02-11T01:36:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![vans1000](https://avatars.discourse-cdn.com/v4/letter/v/9e8a1a/32.png) [@vans1000](https://forum.kirupa.com/u/vans1000)
#### Post date: [February 11, 2007, 1:36am UTC](https://forum.kirupa.com/t/drawing-api-question/215833/1 "2007-02-11T01:36:20Z")

</div>

Hi,

Any tutorials I see on the drawing api usually go like this.

```auto

_root.createEmptyMovieClip("draw", 1);[COLOR=black][COLOR=black]
draw.moveTo(...);
draw.lineTo(...);[/COLOR][/COLOR]

```

[COLOR=black][COLOR=black]

This works great, but when I try to use the drawing API on a movie clip that was not created with createEmptyMovieClip, it doesn’t work. This is the code I use:

[/COLOR][/COLOR]

```auto

my_mc.duplicateMovieClip("my_mc1", this.getNextHighestDepth(), {_x:20, _y:20}); 
my_mc1.moveTo(...);
my_mc1.lineTo(...);

```

[COLOR=black][COLOR=black]  
Any ideas? Is my usage wrong? I’m still new to flash.

Thanks.  
[/COLOR][/COLOR]
