Les cuento, tengo un xml con links, que lo lee un swf insertado en un js que esta en un asp.
Probando desde flash, los links los carga bien y me lleva a la url que el xml dice, pero cuando lo inserto en el sitio, al clickear, aparece undefined y no me carga el link. Les paso los códigos:
XML
Código :
<friends> <friend url="http://www.link1.com">Foto1</friend> <friend url="http://www.link2.com">Foto2</friend> <friend url="http://www.link3.com">Foto3</friend> <friend url="http://www.link4.com">Foto4</friend> <friend url="http://www.link5.com">Foto5</friend> </friends>
Código flash en el primer frame
Código :
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = parseXML;
myXML.load("linksfriends.xml");
function parseXML()
{
text1.txt.text = myXML.firstChild.childNodes[0].firstChild.nodeValue;
text1.strURL = myXML.firstChild.childNodes[0].attributes.url;
text2.txt.text = myXML.firstChild.childNodes[1].firstChild.nodeValue;
text2.strURL = myXML.firstChild.childNodes[1].attributes.url;
text3.txt.text = myXML.firstChild.childNodes[2].firstChild.nodeValue;
text3.strURL = myXML.firstChild.childNodes[2].attributes.url;
text4.txt.text = myXML.firstChild.childNodes[3].firstChild.nodeValue;
text4.strURL = myXML.firstChild.childNodes[3].attributes.url;
text5.txt.text = myXML.firstChild.childNodes[4].firstChild.nodeValue;
text5.strURL = myXML.firstChild.childNodes[4].attributes.url;
text1.onPress = function()
{
getURL(this.strURL);
}
text2.onPress = function()
{
getURL(strURL);
}
text3.onPress = function()
{
getURL(strURL);
}
text4.onPress = function()
{
getURL(strURL);
}
text5.onPress = function()
{
getURL(strURL);
}
}
y en cada botón
Código :
on (press) {
getURL(text1.strURL);
}Estoy hace varios días, si cargo el link del swf funciona bien, pero no en el asp.
Gracias!
Besos!
