# \[as2.0 FMX2004\] removeMovieClip issue

**URL:** <https://forum.kirupa.com/t/as2-0-fmx2004-removemovieclip-issue/204362>\
**Category:** flash\
**Created:** [October 19, 2006, 6:14am UTC](https://forum.kirupa.com/t/as2-0-fmx2004-removemovieclip-issue/204362 "2006-10-19T06:14:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandbar](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@Sandbar](https://forum.kirupa.com/u/Sandbar)\
**Post date:** [October 19, 2006, 6:14am UTC](https://forum.kirupa.com/t/as2-0-fmx2004-removemovieclip-issue/204362/1 "2006-10-19T06:14:42Z")

</div>

Hi all,

I feel that this is probably such a basic question, I feel silly for asking - but here goes:

If I have:

function createSubMenu() {  
attach an empty movie clip to the root timeline (called “target\_mc”)  
then to this “target\_mc” movieclip container, I dynamically create buttons for the menu  
}

Then in another function, where I handle a rollover events for the Main Menu, where I want to remove the movieclip “target\_mc” after a certain rollOut event

ie.,

function mainMenu() {  
// some stuff  
target\_mc.removeMovieClip  
}

doesn’t work.  
Now, I realise this is probably cause it’s not in scope, but how would I remove a movieclip that is dynamically created in another function?

Cheers,  
Sandbar
