# Help needed with Arrays!

**URL:** <https://forum.kirupa.com/t/help-needed-with-arrays/242323>\
**Category:** flash\
**Created:** [October 24, 2007, 7:41pm UTC](https://forum.kirupa.com/t/help-needed-with-arrays/242323 "2007-10-24T19:41:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![polly308](https://avatars.discourse-cdn.com/v4/letter/p/e9c0ed/32.png) [@polly308](https://forum.kirupa.com/u/polly308)\
**Post date:** [October 24, 2007, 7:41pm UTC](https://forum.kirupa.com/t/help-needed-with-arrays/242323/1 "2007-10-24T19:41:18Z")

</div>

Hi im wondering if anyone could help me, im trying to create a drawing api where you can draw something but then what u have drawn gets repeted alongside the original line using the data outputted in an array. this is what i have got so far

\_root.createEmptyMovieClip(“linedrawer”, 1);  
var mydrawing = new Array();  
trace((mydrawing)+30);  
\_root.onMouseDown = function(){  
linedrawer.moveTo(\_xmouse,\_ymouse);  
linedrawer.lineStyle(5, 0xFF0000,(100));

this.onMouseMove = function(){  
linedrawer.lineTo(\_xmouse,\_ymouse);  
mydrawing.push(\_xmouse,\_ymouse);  
updateAfterEvent();  
}  
}  
\_root.onMouseUp = function(){  
this.onMouseMove = null;  
trace(mydrawing);  
}

Thanks
