ciao a tutti! ho un problema. nel mio sito in flash carico una gallery xml, e richiamo nello stage le anteprime delle immagini in un clip filmato, richiamato a sua volta da un indice testuale. ora, se premo l'indice mi dice:

codice:
TypeError: Error #1010: Un termine risulta undefined e non ha proprietà.
	at sitoweb_fla::MainTimeline/creaAnteprima()
qual'è l'errore? l'url è giusto, ma non mi carica le anteprime! che devo fare? ecco il codice.

codice:
import flash.net.URLRequest;
import flash.net.URLLoader;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.Loader;

var portfolio:XML;
var fileXML:URLRequest = new URLRequest("portfolio.xml");
var loader:URLLoader = new URLLoader(fileXML);
loader.load(fileXML);
loader.addEventListener(Event.COMPLETE, xmlloaded);

function xmlloaded(event:Event):void
{
	portfolio = XML(loader.data);
	var nGallery = portfolio.children().length();
	creaMenu(nGallery);
}

function creaMenu(album):void
{
	for (var n:Number=0; n<album; n++)
	{
		var ptGal:Pulsante= new Pulsante();
		menu2.addChild(ptGal);
		ptGal.testo.text = portfolio.children()[n]. @ nome.toUpperCase() + " (" + portfolio.children()[n].children().length() + ") ";
		ptGal.y = 30 * n;
		ptGal.indice = n;
		ptGal.addEventListener(MouseEvent.CLICK, creaAnteprima);
	}
}

var album;

function creaAnteprima(event:MouseEvent):void
{
	album = event.target.parent["indice"];
	var nFoto = portfolio.children()[album].children().length();
	if (anteprime.numChildren != 0)
	{
		for (var n:uint=anteprime.numChildren; n>0; n--)
		{
			anteprime.removeChildAt(n-1);
		}
	}

	for (var k:Number=0; k<nFoto; k++)
	{
		var thumb:Anteprima=new Anteprima();
		anteprime.addChild(thumb);
		if (k > 3)
		{
			thumb.x = 60 * k - 240;
			thumb.y +=  60;
		}
		else
		{
			thumb.x = 60 * k;
		}
		thumb.foto = portfolio.children()[album].children()[k].children();
		thumb.indice = k;
		var file:URLRequest = new URLRequest(portfolio.children()[album].children()[k]. @ anteprima);
		var loader:Loader=new Loader();
		loader.load(file);
		thumb.img.addChild(loader);
		thumb.addEventListener(MouseEvent.CLICK, caricaImg);
	}
}

function caricaImg(event:MouseEvent):void
{
	if (contImg.numChildren != 0)
	{
		contImg.removeChildAt(0);
	}
	var file:URLRequest = new URLRequest(event.target.parent.parent["foto"]);
	var loader:Loader=new Loader();
	loader.load(file);
	contImg.addChild(loader);
}
grazie 1000000 a tutti!!