Help me pleeeeease brilliant people : - )

hey, ok, here’s my problem, i beg for your help, i’ve been trying to figure this out for hours.
so i have a main movie, i load another movie into in with buttons on it, each button calls another movie on top of it but the buttons stay active underneath it, not good. i want the buttons to de-activate when the movie loads on top of it, but activate again once i close the movie on top. any solutions to this problem, you’re all brilliant!