Android camera change based on orientation.

I’m looking for the most simple way to check to see if the orientation of the phone or tablet was changed, if it was switch to another camera. I’ve searched a great deal, and I’ve attempted to create my own, but I don’t seem to understand it. This is what I made.

var camera1:Camera;
var camera2:Camera;

function Start(){ 
camera1.enabled = true;
camera2.enabled = false;
}

function Update(){
if (Screen.orientation(ScreenOrientation.Landscape))	{
camera1.active = true;
camera2.active = false;
}
}

Judging from the reference page it should be:

if(Screen.orientation == ScreenOrientation.Landscape)
    //...
else
    //...

You might want to do look at some tutorials on enums to better understand how they work.