Hola. Yo tengo un problema similar a ver si me pueden ayudar. Tengo un Flash con un tabla que llama a un XML. Ese flash esta incrustado en un xHTML . El problema es que cuando publico el swf desde flash se ve perfecto, y lee todo bien, pero cuando lo pongo online, es swf no muestra el texto del XML, sino el que escribi en el .fla en la caja de texto. No lee el XML.
Pongo el codigo XML
Código :
<?xml version="1.0" standalone="yes"?>
<avance>
<P01>
<ExpresionInteres>10/11/2008</ExpresionInteres>
<LlamadoAConcurso>20/03/2009</LlamadoAConcurso>
<FechaCominezo>01/04/2009</FechaCominezo>
<PorcentajeEjecucion>22,4%</PorcentajeEjecucion>
<FechaFinalizacion>30/04/2011</FechaFinalizacion>
</P01>
<P02>
<ExpresionInteres>10/11/2008</ExpresionInteres>
<LlamadoAConcurso>-</LlamadoAConcurso>
<FechaCominezo>-</FechaCominezo>
<PorcentajeEjecucion>-</PorcentajeEjecucion>
<FechaFinalizacion>-</FechaFinalizacion>
</P02>
<MONITOR>
<ExpresionInteres>-</ExpresionInteres>
<LlamadoAConcurso>-</LlamadoAConcurso>
<FechaCominezo>-</FechaCominezo>
<PorcentajeEjecucion>-</PorcentajeEjecucion>
<FechaFinalizacion>-</FechaFinalizacion>
</MONITOR>
</avance>
CODIGO ActionScript
Código :
function processXMLData(success)
{
if (success)
{
var rootNode=this.firstChild;
var P01Node=findNode(rootNode, "P01");
P01=getValue(P01Node);
var P02Node=findNode(rootNode, "P02");
P02=getValue(P02Node);
var MONITORNode=findNode(rootNode, "MONITOR");
MONITOR=getValue(MONITORNode);
var P01EINode=P01Node.childNodes[0];
P01EI=P01EINode.firstChild.nodeValue;
var P01LLCNode=P01Node.childNodes[1];
P01LLC=P01LLCNode.firstChild.nodeValue;
var P01FCNode=P01Node.childNodes[2];
P01FC=P01FCNode.firstChild.nodeValue;
var P01PNode=P01Node.childNodes[3];
P01P=P01PNode.firstChild.nodeValue;
var P01FFNode=P01Node.childNodes[4];
P01FF=P01FFNode.firstChild.nodeValue;
var P02EINode=P02Node.childNodes[0];
P02EI=P02EINode.firstChild.nodeValue;
var P02LLCNode=P02Node.childNodes[1];
P02LLC=P02LLCNode.firstChild.nodeValue;
var P02FCNode=P02Node.childNodes[2];
P02FC=P02FCNode.firstChild.nodeValue;
var P02PNode=P02Node.childNodes[3];
P02P=P02PNode.firstChild.nodeValue;
var P02FFNode=P02Node.childNodes[4];
P02FF=P02FFNode.firstChild.nodeValue;
var MONITOREINode=MONITORNode.childNodes[0];
MONITOREI=MONITOREINode.firstChild.nodeValue;
var MONITORLLCNode=MONITORNode.childNodes[1];
MONITORLLC=MONITORLLCNode.firstChild.nodeValue;
var MONITORFCNode=MONITORNode.childNodes[2];
MONITORFC=MONITORFCNode.firstChild.nodeValue;
var MONITORPNode=MONITORNode.childNodes[3];
MONITORP=MONITORPNode.firstChild.nodeValue;
var MONITORFFNode=MONITORNode.childNodes[4];
MONITORFF=MONITORFFNode.firstChild.nodeValue;
/*
var contentNode=newsNode.childNodes[1];
var infoNode=newsNode.childNodes[2];
var authorNode=infoNode.childNodes[1];
header=headerNode.firstChild.nodeValue;
content=contentNode.firstChild.nodeValue;
author=authorNode.firstChild.nodeValue;
*/
}
else
{
content="Sin info";
}
}
function getValue(node)
{
if (node && node.firstChild)
return node.firstChild.nodeValue;
return "";
}
function findNode(node, nodeName)
{
if (node.nodeName==nodeName)
return node;
for (var i=0; node.childNodes && i<node.childNodes.length; i++)
{
var foundNode=findNode(node.childNodes[i], nodeName);
if (foundNode!=null)
return foundNode;
}
return null;
}
var xmlData=new XML();
xmlData.ignoreWhite=true;
xmlData.onLoad=processXMLData;
xmlData.load("datos.xml");
stop();
No tengo idea que puede ser y no encuentro en ningun lado ninguna ayuda. Soy principiante y quizas sea un error de lo mas pavo.
Saludos y gracias!