# Flash & XML: String to MovieClip?

**URL:** https://forum.kirupa.com/t/flash-xml-string-to-movieclip/254400
**Category:** flash
**Created:** [March 11, 2008, 5:24pm UTC](https://forum.kirupa.com/t/flash-xml-string-to-movieclip/254400 "2008-03-11T17:24:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![emy](https://avatars.discourse-cdn.com/v4/letter/e/db5fbb/32.png) [@emy](https://forum.kirupa.com/u/emy)
#### Post date: [March 11, 2008, 5:24pm UTC](https://forum.kirupa.com/t/flash-xml-string-to-movieclip/254400/1 "2008-03-11T17:24:37Z")

</div>

Hi! I’ve have an XML file and from that in Flash (Actionscript 2.0) I pulled from a node an attribute that returns the name of the MovieClip I want to call. So this returns a string say “chicken\_mc”. There is already an existing chicken\_mc placed on the root. I want to call that, so how do I use that string I pulled from the XML to call or turn into a movie clip?

Right now I have:

var cTemp:MovieClip = pTemp.attributes.movieclip;

That’s not working because a MovieClip can not = a String. Is there some function I can use to change the String. I tried cTemp.\_name = that too, but \_name is read-only.

I need the movie clip to be called this way because there are a number of different movie clips on the root that the XML might call. Also, there will be a number of iterations as well.

I am really stuck on this! ☹ Please help if you can! Or suggest alternate solutions.

Thanks!
