implementing the WWW class

Hi,

I got this coding from the scripting resources in unity.com

var url = "http://images.earthcam.com/ec_metros/ourcams/fridays.jpg";

function Start () {

// Start a download of the given URL
var www : WWW = new WWW (url);

// Wait for download to complete
yield www;

// assign texture
renderer.material.mainTexture = www.texture;
}

I understand what the code is trying to achieve but I haven't much of an idea what to do with it!

Do I attach this code to a texture called mainTexture or to an empty GameObject? Does the game have to be deployed as a web player? Does the url im accessing have to be in the same folder as the web player or just on the same server?

If anyone could help me in the implementation of the script it would be greatly appreciated!

Thank you.

You attach the script to some object that has a material. It doesn't have to be deployed as a web player.