There is no Method with the name?

I have an .as file with the code:

Math.getMiddle = function(a,b){

}

I have a .fla file that includes the .as file and then trys to run the methods in the .as file. I get the error:

Error Scene=Scene 1, layer=Layer 1, frame=1:Line 357: There is no method with the name ‘getMiddle’.

Anyone help?