Beginner: Can't even get AS to work, seen many tuts

For my website, I am creating a button for the homepage with some cool effects. I got the Flash CS3 part down, but the ActionScript part is confusing me. I type EXACTLY what is posted in tutorials as a test, and I STILL get an error, like with this code…

animation_btn.onPress = function()

I get the error…

Location: Scene 1, Layer 'AS', Frame 1, Line 1
Description:1119: Access of possibly undefined property onPress through a reference with static type flash.display:SimpleButton.
Source:animation_btn.onPress = function()

I was wondering what the problem is… I’m sure any advanced AS coder could solve this easily. If you need more information, read this explanation of the animation…

It consists of 450 frames, and should, overall, act as a button. When the user hovers their mouse over the button, the animation should start. After reaching frame 250, I want to loop it from frame 101-250. When the user clicks, I want it to continue going (ie. not go directly to 251 even if it is at 101, but let it run through), then continue to 400. At frame 400, I want the AS to stop the animation. After a couple seconds, continue from 401 to 450.

The “animation_btn” code is the instance name I gave to the 100% Alpha box on the top of my animation. So firstly, how can I get rid of this error, and secondly, how can I code AS to loop/stop at certain frames?