Having trouble calling a function inside a class from the main timeline

i am getting a “ReferenceError: Error #1069: Property beginTargetLock not found on AimCursor and there is no default value.”

code on the main timeline:

var aimCursor = new AimCursor();
addChild(aimCursor);
aimCursor.beginTargetLock();

code inside the AimCursor class:

package
{
    import flash.display.*;
    import flash.events.*;
    
    public class AimCursor extends MovieClip
    {
        public function AimCursor()
        {
            trace("im here...");
        }
        
        function beginTargetLock():void
        {
            trace("target is locked");
        }
    }
}