function (method:String):Number { if(method = "sin" || method="cos" || method="tan") { return Math[method](1); }else{ //если накосячил trace("invalid param"); return Math.sin(1);//дефолтный вариант } }