Multiple buttons to load text in a scrollable text field

Hi
I have read the tutorial called “loading text from external sources”(with 3 buttons loading 3 different texts) . I tried it but when I click right on the button, it says “cannot place actionscript directly on an object” (I am using as3 and I am REALLY new).
Must the different buttons be on different layers?(In my project, they are on the last page of my site)
I need help, please