Make Link work at beginning of animation?

I have an animation that is going to be the start page for a website. I wanted to add in a skip button that would allow the user to go right to the site. This is the code I used:

*mainPage_btn.onRelease = function() {
getURL(“hompage.html”);
}

*Now the the button doesn’t work as a link until the animation is over, and I was wondering how I could make it work at the begining. I have a keyframe at the begining and end of the movie, and it doesnt matter whether its tweened or not, it still doesn’t work until the end.

When I do a publish preview I get this error message:

*Error Scene=Scene 1, layer=skip, frame=255:Line 1: Statement must appear within on handler
mainPage_btn.onRelease = function() {

Total ActionScript Errors: 1 Reported Errors: 1

*and I’m not sure whether that has something to do with it.

Any help at all would be great.