# Fast Vector.\<int\> creation

**URL:** <https://forum.kirupa.com/t/fast-vector-int-creation/274856>\
**Category:** flash\
**Created:** [November 5, 2008, 9:41pm UTC](https://forum.kirupa.com/t/fast-vector-int-creation/274856 "2008-11-05T21:41:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felixz](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@Felixz](https://forum.kirupa.com/u/Felixz)\
**Post date:** [November 5, 2008, 9:41pm UTC](https://forum.kirupa.com/t/fast-vector-int-creation/274856/1 "2008-11-05T21:41:20Z")

</div>

Is there a faster way to create a vector than:

```auto
   var vect1:Vector.<int> = new Vector.<int>(4,true);
   vect1[0]=1;
   vect1[1]=2;
   vect1[2]=2;
   vect1[3]=2;

```

I have thought that this could be done (as an Array), but it gives an error 5003

```auto
var vect1:Vector.<int> = [1,2,2,2].<int>

```

Any ideas?
