An instance of type 'UnityEngine.Component' is required to access non static member

So I am sure its something simple I am doing wrong but I get that error for each one of these lines

var controller : CharacterController = GetComponent(CharacterController);
var fwd : Vector3 = transform.TransformDirection(Vector3.forward);
var dwn : Vector3 = transform.TransformDirection(Vector3.down);
if (!controller.isGrounded && !Physics.Raycast (transform.position, dwn, 1)){

Any clue what I am doing wrong.

edit(moved from “answer”)

#pragma strict

public class XControls extends MonoBehaviour{


	public class Movement{
	
		private var TiltLimit : float = 0.0;
		public var MovementSpeed : float = 0.0;
		public var MovementSpeedMax : float = 0.0;
		public var MovementSpeedMin : float = 0.0;
		public var MovementSpeedMinAngle : float = 4.0;
		public var MovementSpeedMaxAngle : float = 30.0;
		public var Grounded : boolean = true;
		var Groundedish : boolean = false;
		var HitEnemy : boolean = false;
		private var Direction : boolean = false;
		var GroundDistance : float = 0.0;
		var Jumping : boolean = false;
		public var JumpTime : int = 0;

		public function Movement(MS : float, MSM : float, MSm : float, MSmA : float, MSMA : float, HE : boolean){
        	MovementSpeed = MS;
        	MovementSpeedMax = MSM;
        	MovementSpeedMin = MSm;
        	MovementSpeedMinAngle = MSmA;
        	MovementSpeedMaxAngle = MSMA;
        	HitEnemy = HE;
		}


		function Start () 
		{
			Screen.orientation = ScreenOrientation.AutoRotation;
		}

		function Update()
		{
			var controller : CharacterController = GetComponent(CharacterController);
			var fwd : Vector3 = transform.TransformDirection(Vector3.forward);
			var dwn : Vector3 = transform.TransformDirection(Vector3.down);
			var hit : RaycastHit;
			var curSpeed : float = MovementSpeed * Input.GetAxis ("Vertical");
			controller.SimpleMove(fwd * curSpeed);

			if (!controller.isGrounded && !Physics.Raycast (transform.position, dwn, 1)){
				Grounded = false;	
			}
			else if (Physics.Raycast (transform.position, fwd, 1) && !hit.transform.tag == "Enemy"){
				HitEnemy = true;
				Grounded = false;
			}
			else{
				Grounded = true;
			}

			if (Screen.orientation != ScreenOrientation.Portrait){
				if (Input.gyro.attitude.z > MovementSpeedMinAngle && Input.gyro.attitude.z < MovementSpeedMaxAngle){
					Camera.main.transform.rotation.z = Input.gyro.attitude.z;
				}

				if (Input.gyro.attitude.z >= (MovementSpeedMinAngle + 5)){
					if(Direction){
						transform.rotation.y = 0;
						Direction = false;
					}
					//add movement
				}

				if (Input.gyro.attitude.z >= (MovementSpeedMaxAngle - 5)){
					if(!Direction){
						transform.rotation.y = -180;
						Direction = true;
					}
					//add movement
				}
			}
		}
	}
}

Errors:

Assets/Scripts/Java/AI/Mobile_Control.js(40,64): BCE0020: An instance of type 'UnityEngine.Component' is required to access non static member 'GetComponent'.
 
Assets/Scripts/Java/AI/Mobile_Control.js(41,45): BCE0020: An instance of type 'UnityEngine.Component' is required to access non static member 'transform'.
 
Assets/Scripts/Java/AI/Mobile_Control.js(42,45): BCE0020: An instance of type 'UnityEngine.Component' is required to access non static member 'transform'.
 
Assets/Scripts/Java/AI/Mobile_Control.js(47,73): BCE0020: An instance of type 'UnityEngine.Component' is required to access non static member 'transform'.
 
Assets/Scripts/Java/AI/Mobile_Control.js(50,51): BCE0020: An instance of type 'UnityEngine.Component' is required to access non static member 'transform'.
 
Assets/Scripts/Java/AI/Mobile_Control.js(65,49): BCE0020: An instance of type 'UnityEngine.Component' is required to access non static member 'transform'.
 
Assets/Scripts/Java/AI/Mobile_Control.js(73,49): BCE0020: An instance of type 'UnityEngine.Component' is required to access non static member 'transform'.

I’ve added some to the code since last time but there it is.

Your references to Transform component are in the class Movement, not in the class XControls. Movement does not extends Monobehaviors, it’s nested inside XControls, that’s all, it doesn’t inherit anything from XControls either. That’s why it won’t compile. Also, the Update and Start would not be called.