# Objects on the fly

**URL:** <https://forum.kirupa.com/t/objects-on-the-fly/251836>\
**Category:** flash\
**Created:** [February 13, 2008, 2:59am UTC](https://forum.kirupa.com/t/objects-on-the-fly/251836 "2008-02-13T02:59:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![worthington747](https://avatars.discourse-cdn.com/v4/letter/w/b9e5f3/32.png) [@worthington747](https://forum.kirupa.com/u/worthington747)\
**Post date:** [February 13, 2008, 2:59am UTC](https://forum.kirupa.com/t/objects-on-the-fly/251836/1 "2008-02-13T02:59:35Z")

</div>

For the sake of writing less code, I looking for a solution for creating objects with a class declaration stored in a String.

How would the following object instantiation be writen to dynamically call the creation of objects using the following method?

```auto
 
var dynaBall:String="RedBall"
var myBall=new dynaBall()
//where RedBall exists as a library class

```

Any help would be greatly appreciated
