Disabling Buttons from external .swf

When a certain .swf loads, I want it to go to the main.swf and tell a certain button to be disabled. How do I do this? Thanks.