# Drawing API syntax

**URL:** <https://forum.kirupa.com/t/drawing-api-syntax/158608>\
**Category:** flash\
**Created:** [August 10, 2005, 6:22pm UTC](https://forum.kirupa.com/t/drawing-api-syntax/158608 "2005-08-10T18:22:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chic0](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chic0](https://forum.kirupa.com/u/chic0)\
**Post date:** [August 10, 2005, 6:22pm UTC](https://forum.kirupa.com/t/drawing-api-syntax/158608/1 "2005-08-10T18:22:41Z")

</div>

In Flash MX this code:

```auto

this.createEmptyMovieClip("someshapes", 1);
this.someshapes.lineStyle(2, 0x00ee00, 100); 
this.someshapes.beginFill(0x00cc00, 50);
this.someshapes.moveTo(50, 50);
this.someshapes.lineTo(200, 150);
this.someshapes.lineTo(80, 210);
this.someshapes.endFill();
this.someshapes.lineStyle(3, 0x00eeee, 30);
this.someshapes.beginFill(0x0000cc, 60);
this.someshapes.moveTo(180, 130);
this.someshapes.curveTo(200, 80, 250, 70);
this.someshapes.curveTo(200, 10, 40, 90);
this.someshapes.endFill();

```

could also be written as:

```auto
 this.createEmptyMovieClip("someshapes", 1);
with (this.someshapes) {
    lineStyle(2, 0x00ee00, 100); 
    beginFill(0x00cc00, 50);
    moveTo(50, 50);
    lineTo(200, 150);
    lineTo(80, 210);
    endFill();
    lineStyle(3, 0x00eeee, 30);
    beginFill(0x0000cc, 60);
    moveTo(180, 130);
    curveTo(200, 80, 250, 70);
    curveTo(200, 10, 40, 90);
    endFill();
} 

```

Could it be that in Flash MX 2004 that’s no longer possible?  
Cuz when I leave the ‘this’ behind, moveTo etc. don’t color blue… ☹
