# Type conversion problem

**URL:** <https://forum.kirupa.com/t/type-conversion-problem/285107>\
**Category:** flash\
**Created:** [March 27, 2009, 2:04am UTC](https://forum.kirupa.com/t/type-conversion-problem/285107 "2009-03-27T02:04:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmathur](https://avatars.discourse-cdn.com/v4/letter/g/48db29/32.png) [@gmathur](https://forum.kirupa.com/u/gmathur)\
**Post date:** [March 27, 2009, 2:04am UTC](https://forum.kirupa.com/t/type-conversion-problem/285107/1 "2009-03-27T02:04:26Z")

</div>

```auto

var myArray:Array = ["abc", "xyz"];

//In the library I have a MC with the linkage class 'abc'
//so to generate a new instance of abc i wish to use
addChild(new myArray[0]());

```

Can somebody suggest the correct AS3 code.  
I guess I am running into some type conversion issues as the original value in the array is a String.
