# Multipe createEmptyMovieClip problems

**URL:** <https://forum.kirupa.com/t/multipe-createemptymovieclip-problems/187508>\
**Category:** flash\
**Created:** [April 29, 2006, 9:21pm UTC](https://forum.kirupa.com/t/multipe-createemptymovieclip-problems/187508 "2006-04-29T21:21:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ayreos](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ayreos/32/2415_2.png) [@Ayreos](https://forum.kirupa.com/u/Ayreos)\
**Post date:** [April 29, 2006, 9:21pm UTC](https://forum.kirupa.com/t/multipe-createemptymovieclip-problems/187508/1 "2006-04-29T21:21:32Z")

</div>

Ok, so I am using a basic stamp and processing to create an interface in flash. So far I have it draw a line from the middle of the stage to the x-y of my custom mouse when you push a button. That’s the easy part.

What I am trying desperatley to do is to make each line stay on screen, and when you press the button a new line is drawn. This is where the problem is. Right now it’s erasing the old line and drawing a new one every time.

I have tried everything under the sky that my basic knowledge can think of. It seems that what I need is to name each new EmptyMovieClip with an increasing number at the end (like “line1” then :“line2” etc) but when I try that I can’t get the lineStyle and moveTo commands to recognize the names.

Any suggestions? And let me know if I need to explain my problem more…

Here is the part of my Actionscript:

```
inVarY = (inData[0]*2);
inVarX = (inData[1]*2);
btnVar = (inData[2]);

	
	if (btnVar == 0){
	makeLine();
	}

```

}  
function makeLine(){

```
_root.createEmptyMovieClip("line",0);
line.lineStyle(1,0xABCDEF,100);
line.moveTo(_root.tank_mc._x,_root.tank_mc._y);
line.lineTo(_root.bob._x,_root.bob._y);
}

```

Thanks in advance,  
-Irie
