# Referring to linked clips

**URL:** <https://forum.kirupa.com/t/referring-to-linked-clips/272060>\
**Category:** flash\
**Created:** [October 1, 2008, 6:24pm UTC](https://forum.kirupa.com/t/referring-to-linked-clips/272060 "2008-10-01T18:24:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![activa](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@activa](https://forum.kirupa.com/u/activa)\
**Post date:** [October 1, 2008, 6:24pm UTC](https://forum.kirupa.com/t/referring-to-linked-clips/272060/1 "2008-10-01T18:24:03Z")

</div>

How can I instantiate a linked clip using a variable name?

In other words, I want to say

"var someName:String = ‘clipName’;  
var someClip:MovieClip = addChild (new someName as MovieClip);

But obviously that throws an error, since the someName is a string, not a movieclip. In previous versions, I could use the “eval” function. AS3 uses casting to force someName to be a movieclip, as long as it is a subclass of movieclip, but in this case, I can’t do that.
