# AddListener to a button inside of a movieclip in the library?

**URL:** <https://forum.kirupa.com/t/addlistener-to-a-button-inside-of-a-movieclip-in-the-library/296534>\
**Category:** flash\
**Created:** [September 16, 2009, 7:07am UTC](https://forum.kirupa.com/t/addlistener-to-a-button-inside-of-a-movieclip-in-the-library/296534 "2009-09-16T07:07:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aesthetics7](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@aesthetics7](https://forum.kirupa.com/u/aesthetics7)\
**Post date:** [September 16, 2009, 7:07am UTC](https://forum.kirupa.com/t/addlistener-to-a-button-inside-of-a-movieclip-in-the-library/296534/1 "2009-09-16T07:07:39Z")

</div>

Could someone steer me in the right direction of how to add a listener to a button inside of a movieclip that is in the library?

Example:  
Root-\>work\_mc(timeline)-\>workss\_mc(added with Addchild)

There is workss\_mc in the library that gets loaded when someone clicks a button inside of work\_mc. This is achieved with addChild. Within workss\_mc there is a close button to close this. I’ve run into problems with working the navigation with this b/c I need to declare and create a single instance of workss\_mc at a scope where it is visible to both click handlers, Doing this will place both handlers in one location. So in order to do that I would need them all to be where the navigation code is, the root.

So how can I access workss\_mc from the root?
