what's wrong with this??

hi there, im converting a script from C# to javascript.

the problem here is there is an error stated :
BCE0020 : An instance of type 'UnityEngine.Component is required to access non static member ‘GetComponent’.

any help is appreciated… ^___^

here are the scripts.

JAVASCRIPT

#pragma strict

var camera : GameObject;
var menu : GameObject;
var SelectSound : AudioClip;
var SelectDownSound  : AudioClip;

function Start(){
	camera = GameObject.Find("Main Camera");
	menu = GameObject.Find("Menu");
}

function OnMouseEnter(){
	audio.clip = SelectSound;
	audio.Play();
}

function OnMouseOver(){
	renderer.material.color = Color.blue;
}

function OnMouseExit(){
	renderer.material.color = Color.white;
}

function OnMouseDown(){
	audio.clip = SelectDownSound;
	audio.Play();
	
	RotateCamera();
}

function RotateCamera(){

	Camera.GetComponent(SmoothLookAtJS).target = menu.transform;// error in JS
}

C# SCRIPT

using UnityEngine;
using System.Collections;

public class BackToMenu : MonoBehaviour 
{
	public GameObject camera;
	public GameObject menu;
	public AudioClip SelectSound;
	public AudioClip SelectDownSound;
	
	void Start()
	{
		camera = GameObject.Find("Main Camera");
		menu = GameObject.Find("Menu");
	}
	
	void OnMouseEnter() 
	{
		audio.clip = SelectSound;
		audio.Play(); 
    }
	
	void OnMouseOver() 
	{
		renderer.material.color = Color.blue;
    }
	void OnMouseExit() 
	{
		renderer.material.color = Color.white;
    }
	void OnMouseDown() 
	{
		audio.clip = SelectDownSound;
		audio.Play();
		
		RotateCamera();
    }
	
	void RotateCamera()
	{
    camera.GetComponent<SmoothLookAt>().target = menu.transform;// no error on C#
	}
}

Simple- you mis-spelled ‘camera’.

You put a capital c on it-

Camera

instead of lower-case

camera

‘Camera’ refers to the static ‘Camera’ class, whereas ‘camera’ will return a reference to the first found ‘Camera’ object connected to the same Object. You need to use the ‘camera’ version to have access to functions that don’t make sense without an instance- such as ‘GetComponent’.

Camera.GetComponent(SmoothLookAtJS).target = menu.transform;

use small “c” (camera.GetComponent()), as otherwise you are addressing Camera class rather than camera member