# More Efficient Syntax

**URL:** https://forum.kirupa.com/t/more-efficient-syntax/277566
**Category:** flash
**Created:** [December 13, 2008, 11:13pm UTC](https://forum.kirupa.com/t/more-efficient-syntax/277566 "2008-12-13T23:13:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)
#### Post date: [December 13, 2008, 11:13pm UTC](https://forum.kirupa.com/t/more-efficient-syntax/277566/1 "2008-12-13T23:13:10Z")

</div>

What’s a nice short way to write this?

```auto

var line_1:Line_1;
var line_2:Line_2;
var line_3:Line_3;
var line_4:Line_4;

line_1 = new Line_1;// add from Library
line_1.name = "line_1";
line_1.x = 111;
line_1.y = 151;
addChild(line_1);

line_2 = new Line_2;// add from Library
line_2.name = "line_2";
line_2.x = 111;
line_2.y = 175;
addChild(line_2);

line_3 = new Line_3;// add from Library
line_3.name = "line_3";
line_3.x = 111;
line_3.y = 198;
addChild(line_3);

line_4 = new Line_4;// add from Library
line_4.name = "line_4";
line_4.x = 111;
line_4.y = 220;
addChild(line_4);

```
