# Help Accessing Nested Movie Clips Using XML

**URL:** <https://forum.kirupa.com/t/help-accessing-nested-movie-clips-using-xml/316464>\
**Category:** flash\
**Created:** [November 22, 2010, 7:03pm UTC](https://forum.kirupa.com/t/help-accessing-nested-movie-clips-using-xml/316464 "2010-11-22T19:03:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zwhalbert](https://avatars.discourse-cdn.com/v4/letter/z/4bbf92/32.png) [@zwhalbert](https://forum.kirupa.com/u/zwhalbert)\
**Post date:** [November 22, 2010, 7:03pm UTC](https://forum.kirupa.com/t/help-accessing-nested-movie-clips-using-xml/316464/1 "2010-11-22T19:03:43Z")

</div>

I am trying to access a nested movie clip that I get from an XML. Only problem is when I try passing the name to my function

```auto

public function PlayAction(parentClip:MovieClip, mcName:String, frameName:String):void
		{
			parentClip.mcName.gotoAndPlay(frameName);
		}

```

I get a null reference error and I don’t know why??? I tried setting mcName to one of the movie clips that I will need to access and it works the only thing is I need to be able to access different movieclips and I want to avoid switch statements as much as possible, but I am at a loss as to how to make this work. If I’m not making any sense send me a pm and I will get back to you as soon as I can.

Thanks  
Zach
