Same movie clip, different instances, getURL

I have a movie clip named “restlink.”

I drag it to frame one on layer “link,” and give it an instance name of “link1.”

At frame 100, I create a keyframe on “link” layer, and change the instance name to “link2.”

In frame one of the “actions” layer, I enter the following:

link1.onRelease = function ():Void {
    getURL('http://www.website1.com','_blank');
};
link2.onRelease = function ():Void {
    getURL('http://www.website2.com','_blank');
};

The result is the link1 works, but link2 does not. After frame 100, there is no link.

If I attach the actions to the keyframes, everything is fine.

But I do not understand why the actions can not all be in frame 1 of the actions layer.

What am I missing?