# Question about removing eventlistener on main timeline using code within mc

**URL:** <https://forum.kirupa.com/t/question-about-removing-eventlistener-on-main-timeline-using-code-within-mc/318895>\
**Category:** flash\
**Created:** [February 2, 2011, 10:18pm UTC](https://forum.kirupa.com/t/question-about-removing-eventlistener-on-main-timeline-using-code-within-mc/318895 "2011-02-02T22:18:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matrixm5](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@matrixm5](https://forum.kirupa.com/u/matrixm5)\
**Post date:** [February 2, 2011, 10:18pm UTC](https://forum.kirupa.com/t/question-about-removing-eventlistener-on-main-timeline-using-code-within-mc/318895/1 "2011-02-02T22:18:41Z")

</div>

I have an event listener on my main timeline and I have an mc with some AS which sits on the main timeline. I was just wondering if the following code is correct if I wanted to remove the event listener on the maintimeline from the AS written in the mc.

MovieClip(parent).removeEventListener(Event.REMOVED\_FROM\_STAGE,  
MovieClip(parent).removedFromStageHandler);

thanks.
