bueno por ahora he optado por hacerlo con variables pero no fnciona, a ver si alguien sabe cual es el error
codigo del flash
Código :
var langxml:XML;
var langloader:URLLoader = new URLLoader();
langloader.addEventListener(Event.COMPLETE, whenLangLoaded);
function whenLangLoaded(lange:Event):void
{
langxml = new XML(lange.target.data);
this.inicio_txt.text = langxml.idioma.ingles.inicio;
}
langloader.load(new URLRequest("idiomas.xml"));
this.español.addEventListener(MouseEvent.CLICK,español2);
this.ingles.addEventListener(MouseEvent.CLICK,ingles2);
function español2 (event:MouseEvent):void{
this.inicio_txt.text = langxml.idioma.espanol.inicio;
}
function ingles2 (event:MouseEvent):void{
this.inicio_txt.text = langxml.idioma.ingles.inicio;
}
Código :
<?xml version="1.0" encoding="ISO-8859-1"?>
<idioma>
<espanol>
<inicio>INICIO</inicio>
<productos>PRODUCTOS</productos>
</espanol>
<ingles>
<inicio>HOME</inicio>
<productos>PRODUCTS</productos>
</ingles>
</idioma>