Using Code Snippets: Click Goto Frame & Play

I’ve been using the code snippets to apply code to buttons. Simply just to have them go to a frame when clicked. I’ve used the same button with different instance names for each ‘page’. I’ve currently run into the dreaded ‘TypeError: Error #1009: Cannot access a property or method of a null object reference.’ I understand what this error means. From my understanding, Flash cannot ‘find’ the object because the Actionscript is not on the same keyframe as the object. However, I’ve used the same methodology with the others and they work flawlessly.

What do you suppose the reason for this is?

Another question:

Can someone explain what this is “[FONT=Helvetica]fl_ClickToGoToAndPlayFromFrame_118” its automatically generated by Code Snippets. Frame 118 is a random frame in my timeline. Here is the whole code for those who dont understand:

button.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_118);

function fl_ClickToGoToAndPlayFromFrame_118(event:MouseEvent):void
{
gotoAndPlay(108);
}

Thanks!!!
[/FONT]