I have frame scripts on the first frame of my root timeline, and extend that frame through the whole flash file
The buttons that use it don't show up until later, say the 5th or 6th frame.
They don't seem to recognize the 1st frame script even though I have extended the frame to where the button shows up.
It seems if I make a keyframe with that script above each frame where the button starts, it will work, but is there
any easier way to do this. Because if I have to make a change to the code, I have to copy it to each frame?
if you try and reference objects (like your buttons) before they exist, flash will not be able to use your coding.
to remedy, create your buttons in frame 1. you can always use their _visible property to make them appear and not appear when it suits your needs.
What Kglad suggests is probably the simplest solution if you are using frame scripts.
Other than that, you could:
Code directly on the MC or Button (simple, but not recommended)
You could set up an interval or enterframe function that could call your desired functionality for the button. ( more complex, and probably overkill for 1 or two buttons.)