# Targeting parent of clicked MC

**URL:** <https://forum.kirupa.com/t/targeting-parent-of-clicked-mc/318881>\
**Category:** flash\
**Created:** [February 2, 2011, 5:17pm UTC](https://forum.kirupa.com/t/targeting-parent-of-clicked-mc/318881 "2011-02-02T17:17:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![travisschau](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@travisschau](https://forum.kirupa.com/u/travisschau)\
**Post date:** [February 2, 2011, 5:17pm UTC](https://forum.kirupa.com/t/targeting-parent-of-clicked-mc/318881/1 "2011-02-02T17:17:26Z")

</div>

hi there!  
this one’s driving me crazy. I’ve got a button embedded in a MovieClip. When the user clicks the button (from the stage level), I want to return what MC the button’s parent is, so that I can pull some variables from the parent.

```auto
public function buttonClicked(e:MouseEvent)
{
       var curNum = MovieClip(e.currentTarget).MovieClip(parent).buttonNum;
}

```

And I get Error #1034: Type Coercion failed: cannot convert ButtonMC@3aabf431 to flash.display.MovieClip.  
at HolderMC/ButtonSlot1()

I think my syntax is all messed up, but I can’t figure out how to fix it. Any help would be really appreciated.

If it makes things worse, the parent MC is actually of a different class that’s extending MovieClip.

-Travis
