# Why can't I access button from inside MC?

**URL:** <https://forum.kirupa.com/t/why-cant-i-access-button-from-inside-mc/283041>\
**Category:** flash\
**Created:** [March 2, 2009, 12:12am UTC](https://forum.kirupa.com/t/why-cant-i-access-button-from-inside-mc/283041 "2009-03-02T00:12:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imadingo](https://avatars.discourse-cdn.com/v4/letter/i/838e76/32.png) [@imadingo](https://forum.kirupa.com/u/imadingo)\
**Post date:** [March 2, 2009, 12:12am UTC](https://forum.kirupa.com/t/why-cant-i-access-button-from-inside-mc/283041/1 "2009-03-02T00:12:54Z")

</div>

I am learning how to create menu systems for a game and have a few different “screens” (movieclips with buttons and such).

I am getting Undefined Property errors when I try to access a button from the class file of a screen.

Example: I have a MainMenu screen. This has its own class MainMenu.as.

Inside the library MainMenu movieclip, I have a button, instance named start\_button.

But inside the MainMenu.as file, I try to do start\_button.addEventListener(…) and it says undefined property.  
I tried doing getChildByName(“start\_button”), that won’t work either.

I am following a tutorial, which makes this even more frustrating.
