Action script and layers

I have an actionscript layer and on frame one I have all my actionscript, however on another layer and fame 50 I have put some button_mc but they do not work unless I put the actionscript on the same frame on the actions layer. what is wrong?