Problem texturing a mesh in JScript?

Well what I have at the moment I have imported a FBX mesh that has the usual components, its just a quad for a floor tile that has a material section that I want to be able to change the texture of in code to create different areas.

I have this code:
private var FloorTile:GameObject;
private var Flooring:GameObject;
private var FloorTexture:Texture2D;

function Start () {
	var Count:int;
	
	Camera.main.transform.position = Vector3( 0.0, 1.0, 0 );
	
	FloorTile = Resources.Load( "floor" ) as GameObject;
	
	FloorTexture = new Texture2D[ 10 ];
	FloorTexture[ 0 ] = Resources.Load( "floor1" ) as Texture2D;
	FloorTexture[ 1 ] = Resources.Load( "floor2" ) as Texture2D;
	
	Flooring = new GameObject[ 10 ];
	
	for ( Count=0; Count<10; Count++ ) {
		Flooring[ Count ] = GameObject.Instantiate( FloorTile );
		Flooring[ Count ].transform.position = Vector3( 0, 0, Count *2.0 );
		Flooring[ Count ].transform.localScale = Vector3( 100, 100, 100 );
		Flooring[ Count ].AddComponent( "MeshRenderer" );
		
		if ( Count != 4 ) {
			Flooring[ Count ].renderer.material.mainTexture = FloorTexture[ 0 ];
		} else {
			Flooring[ Count ].renderer.material.mainTexture = FloorTexture[ 1 ];
		}
	}
	
	Flooring[ 4 ].renderer.material.mainTexture = FloorTexture[ 1 ];
}

FloorTile is just a GameObject reference, FloorTexture is a array of Texture2D and Flooring is a array of GameObject mainly for testing purposes. All my textures are loaded and are in there fine this I have checked.

The problem is no matter what I do I cannot texture the meshes that are Instantiated, now I know its probably something stupidly simple but at the moment it eludes me as to what it is. All I want to do is put whatever texture I want onto the mesh using code so I can create loads of different sections of flooring, I have other meshes but this code when it works will help me get everything completed.

Anyone have any ideas?

Well it seems that if you copy a mesh then you texture it in the editor it will texture all meshes that are copied from that mesh, the same happens in code.

you can however texture the meshes individually when you drag a texture from the assets window onto the editor main window (3d view) and onto the object. I have reported this as a bug as if you duplicate an entity in the editor you should be able to texture them individually as its a copy of the main object not a link to it.