camera Scope problems

hey i have a script that Scopes my camera only it jumps i want i to Smoothly Flow how do i do this?? this is my script

var zoomSpeed : float = 2.5;

function Update () {
    if (Input.GetButtonDown("Fire2"))
    {
        camera.fieldOfView = 26;
    }

    else if (Input.GetButtonUp("Fire2"))
    { 
        camera.fieldOfView = 66;
    }
}

i this script don`t work with me don`t know whats the problem

//OtherScript.js   
private var zoom : boolean = false;   
var zoomSpeed : float = 2.5;

if (Input.GetButtonDown("Fire2")){
    if(!zoom) {   
         zoom=true;
    }

    else{
         zoom=false;
    }
}

if(!zoom){
    if(camera.fieldOfView<66) {
         camera.fieldOfView = Mathf.Clamp(camera.fieldOfView+zoomSpeed,26,66);
    }

}
else{
     if(camera.fieldOfView>26) {
         camera.fieldOfView = Mathf.Clamp(camera.fieldOfView-zoomSpeed,26,66);
     }
}

Your code is very dirty and hard to read so I'm not quite sure what you are trying to do...

BUT I think this will work:

var zoomSpeed : float = 5;
var zoomedInFOV : int = 20;
var soomedOutFOV : int = 60;
private var isZoomed = false;

function Update () {
    if(Input.GetButtonDown("Fire2")){
        isZoomed = !isZoomed;
    }
    if(isZoomed == true){
        camera.fieldOfView = Mathf.Lerp(camera.fieldOfView,zoomedInFOV,Time.deltaTime*zoomSpeed);
    }
    else{
        camera.fieldOfView = Mathf.Lerp(camera.fieldOfView,soomedOutFOV,Time.deltaTime*zoomSpeed);
    }
}

Also when you post code please select it and press the ones and zeros button to format it correctly it is so much easier to read.

thanks mate works fine only now it was goint backwards so i have tweaked the script now id does what i want it to do tnx for your work