# How to construct an array

**URL:** <https://forum.kirupa.com/t/how-to-construct-an-array/330366>\
**Category:** flash\
**Created:** [January 9, 2013, 11:15am UTC](https://forum.kirupa.com/t/how-to-construct-an-array/330366 "2013-01-09T11:15:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FJW](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@FJW](https://forum.kirupa.com/u/FJW)\
**Post date:** [January 9, 2013, 11:15am UTC](https://forum.kirupa.com/t/how-to-construct-an-array/330366/1 "2013-01-09T11:15:04Z")

</div>

Hi Guys  
I have a piece of code that produces an array of Vector3D points correctly.  
i.e trace gives -  
\<code\>  
Vector3D(130, -20,0), VectorD(250, -20, 280), Vector3D(130, -20, 0);  
\</code\>  
What I need is for the array to be like this  
\<code\>  
new Vector3D(130, -20, 0), new Vector3D(etc, etc  
\</code\>  
Here is my snippet, is there an easy way to do this? Thanks in advance for any help.  
\<code\>  
public function onMouseDown(ev:MouseEvent3D) :void  
{  
if (mouseEnabled3D)  
{  
var obj2 : Object3D = ev.object;  
shiftKey = ev.shiftKey;  
\_mouseVector = new Vector3D(obj2.x, obj2.y, obj2.z);  
\_pointsArray.push(\_mouseVector);  
\_mouseVector=null;  
}  
if (shiftKey)  
{  
buildWall();}  
}  
\</code\>
