# Create new instances of sprites from linkage class names inside an array

**URL:** <https://forum.kirupa.com/t/create-new-instances-of-sprites-from-linkage-class-names-inside-an-array/309534>\
**Category:** Uncategorized\
**Created:** [May 17, 2010, 11:52pm UTC](https://forum.kirupa.com/t/create-new-instances-of-sprites-from-linkage-class-names-inside-an-array/309534 "2010-05-17T23:52:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThreeDollarBill](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@ThreeDollarBill](https://forum.kirupa.com/u/ThreeDollarBill)\
**Post date:** [May 17, 2010, 11:52pm UTC](https://forum.kirupa.com/t/create-new-instances-of-sprites-from-linkage-class-names-inside-an-array/309534/1 "2010-05-17T23:52:10Z")

</div>

i have sprites in the library with linkages in them… how would i create new instances of them if they are stored inside an array?

example:

```auto

// obviously this code wont work...
// but i am trying to achieve something like this..
var spriteArray:Array = [wheels, body, floor];

var spriteToBeGrabbed:Sprite = spriteArray[2];

var theSprite:Sprite = new spriteToBeGrabbed;
theSprite.x = 20;
theSprite.y = 30;
addChild(theSprite);

```
