I would guess that you have set your current document to export to AS3 and not AS2. Under AS3 you cannot apply code directly to instances. All code must either be on a timeline or a Class.as file.
If you want to put the code on an object you can change your publish settings to AS2. However even if you do this, putting code on objects is not the best practices and has been dying out since Flash 6 was introduced in 2002. Here is a good article about the issue:
I would really reccomend that you start using timeline code. It is so much easier to code and maintain!
you can't apply actionscript in the button's "timeline". drag your button from the library to a timeline and then you can apply actionscript to your button.
(but, you would be better served by learning to code with nothing attached to objects like buttons and movieclips.)
thanks for your help! It was such a breeze the old way. I come from a design background and not a programming background so I hope you can understand my frustration with all the code inputting in flash CS4 for simple events these days. what a drag. thankfully I'm not doing that on a daily basis.
thanks again, Don
cs4 is not different from previous versions with respect to actionscript syntax/rules.
if you're using as3, that is a lot different than as2 but then rothrock's post is relevant to you. if you're using as2, there's no change in the restrictions of code placement: you never could apply code on the button's "timeline".