Os cuento la situación tengo dos peliculas swf. una llama a un archivo xml del que toma unos datos. esta a su vez se carga en un MC de la segunda peli, el MC se llama contenedor1.
Por separado la primera peli funciona bien, carga sin problemas el xml, pero al cargarse en la segunda peli no se carga el archivo xml.
Os paso el script por si podeis ayudarme. Por cierto todos los archivos estan en el mismo directorio.
Código :
stop();
var filelink = "bio-esp.xml";
var spacing = 60;
var my_xml:XML = new XML();
my_xml.ignoreWhite = true;
startheight=0
contmc.entry._visible = false;
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet();
cssStyles.onLoad = function(success) {
if (success) {
news.TheText.testtxt.styleSheet = cssStyles
dates.TheText.testtxt.styleSheet = cssStyles
}else{
news.TheText.testtxt.text= "CSS unable to load, contact webmaster.";
}
}
my_xml.onLoad = function(success:Boolean) {
if(success) {
tracknumber = my_xml.firstChild.childNodes.length;
for (x=0; x<tracknumber; x++) {
duplicateMovieClip(_root.contmc.entry, "entry"+x, _root.contmc.getNextHighestDepth());
clipRef = eval("_root.contmc.entry"+x)
setProperty(clipRef, _y, spacing+startheight);
clipRef.titletxt.text = my_xml.firstChild.childNodes[x].childNodes[0].firstChild.nodeValue;
clipRef.artisttxt.text = my_xml.firstChild.childNodes[x].childNodes[1].firstChild.nodeValue;
clipRef.desctxt.text = my_xml.firstChild.childNodes[x].childNodes[2].firstChild.nodeValue;
startheight = clipRef._y + clipRef.desctxt.textHeight;
}
nextFrame();
} else {
trace("Unable to load XML");
}
}
my_xml.load(filelink); 