ReferenceError: Error #1069?

Hey guys I’m completely new to flash and I’m building a website right now. I’m trying to get my buttons to function with my pages, but I keep getting this error, and nothing but a continuous loop of my pages content.

“ReferenceError: Error #1069: Property num not found on flash.text.TextField and there is no default value.
at streetlightfinal_fla::MainTimeline/onclk()”

What am I doing wrong? :eyeup:

Here’s my code.

stop();

function makebutton(mc:MovieClip, num:int):void{
    
    mc.addEventListener(MouseEvent.CLICK, onclk);
    mc.buttonMode=true;
    mc.num=num;
    
    }

    function onclk(e:MouseEvent):void{
        pages.gotoAndStop(e.target.num);
    }
    
    makebutton(home_btn,1);
    makebutton(bio_btn,2);
    makebutton(gallery_btn,3);
    makebutton(music_btn,4);