where did you place the button code? my first instinct is you might have had the button selected when you entered the code into the actions panel instead of having the frame selected. in that case, the code won't execute but i can't remember if flash gives you a warning when that happens.
i've made a quick test movie to show you what i did.
http://www.vectorthis.com/temp/replay.fla