Ridiculously difficult to make a button -> link!?

EDIT: Issue resolved, had 3 keyframes for my button (1 on frame 1, 2 for animation) and the button in the keyframe on frame 1 didn’t have an instance name. You’d think that wouldn’t matter because the button on frame 20 had the right instance name and the code doesnt get called till frame 20, but noooo… :sigh:

I really don’t understand what Adobe has done to Flash, it used to be very straightforward and simple to make a button go to a URL. :m:

Anyhow, what I’ve done is just made a button with the instance name bt1 on the stage, and on my actions layer on the frame above it I’ve put the following code: (the stop(); is just there because I animate the button into the scene)

btn1.addEventListener(MouseEvent.MOUSE_UP, goToSite);

function goToSite(event:MouseEvent) : void {
	var site = new URLRequest('http://viterbi.usc.edu/aviation/');
	navigateToURL(site);
}

stop();

However when I test movie, the error I get is:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at sample_fla::MainTimeline/frame20()

and I cannot figure out for the life of me what is causing it; I’ve already spent 2 hours just searching the web on this error and buttons in general.

Please help ;(