Actionscripting at a specific frame

I have a problem. I want to add actionscript code on the first frame of my movie(to keep all the code together) to several buttons that appear in a section that isnt loaded at the beginning but loaded later on, therefore I cant use the onEnterFrame code(at least I dont think so). I hope that makes sense… Any ideas?