Flash WWW.texture problem

I need to apply texture files from an online location (same server as the swf) to objects in the scene, but I’ve had no luck at all with WWW class. Here is the code I’m testing:

#pragma strict

var url = "http://myserver.com/texture.jpg";
var plane : GameObject;
plane = GameObject.Find( "Plane" );

var www : WWW;
var isDone = "Texture Loading . . .";

function Start ()
{
	www = new WWW (url);
}

function OnGUI () 
{
	if (!www.isDone)
	{
		GUI.Label ( Rect (23, 23, 100, 30), isDone );
	}	
	else
	{
		if (GUI.Button (Rect (10,10, 100, 50), "Apply Texture")) 
		{
			plane.renderer.material.mainTexture = www.texture;			
		}
	}

}

It works in the editor. When I place a test build online, the Apply Texture button has no effect.

Am I doing something wrong? If not, is there a workaround? Thanks.

Solved! Turns out it’s my server. I have no idea why I can’t load an image from my server, but at least I’ve narrowed it down. Anybody have any ideas what it might be?

A guess; your server needs a Flash crossdomain.xml for Flash to be able to access it.