[as2.0 FMX2004] removeMovieClip issue

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


function mainMenu() {
// some stuff

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?