Compiler errors while switching to android

I had it set to web player and had no compiller errors now that i switch to android i come up with this

Assets/Scripts/VideoController.cs(9,17): error CS0246: The type or namespace name `MovieTexture’ could not be found. Are you missing a using directive or an assembly reference?

my code for VideoController.cs is

using UnityEngine;
using System.Collections;

public class VideoController : MonoBehaviour {

	// Use this for initialization
	void Start () {
		
		MovieTexture movie = renderer.material.mainTexture as MovieTexture;
		movie.Play();
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}

This means that the compiler couldn’t find the MovieTexture class anywhere within your project. Are you sure it’s there?

EDIT: So you’re a JS coming to C#, first watch some C# tutorials.

When you write your script in JS (say myScript.js), you’ll get a blank script that looks like this:

function Start()
{

}

function Update()
{

}

You are actually writing inside a class, but you don’t know it. The equivalent of this in C#:

public class myScript : MonoBehaviour
{
  // *
  void Start()
  {

  }

  void Update()
  {

  }
  // *
}

What’s between the ‘*’ is what you get in JS. So, go to Unity, create a new C# script, name it MovieTexture - and write your code inside it.

Or if you wanna write the class in the same file, just get out of the scope of the current class and do

class MovieTexture
{
  // your stuff goes here...
}

EDIT: I haven’t used MovieTexture before so I thought it’s a user-defined class.