I am trying to do a newscaster with images by means of file XLM. I have a code, but in KoolMoves it doesn´t work.
Why ?, Because probably the code is AS2.
The code is :
That it is necessary to change in order that the code works in KoolMoves ?Code:System.useCodepage = true; var indice:Number; var noticias_xml:XML; function cargarDatos(_indice:Number) { var fecha:String; var titulo:String; var mensaje:String; var imagen:String; fecha = noticias_xml.firstChild.childNodes[_indice].attributes.fecha; titulo = noticias_xml.firstChild.childNodes[_indice].firstChild.firstChild.nodeValue; mensaje = noticias_xml.firstChild.childNodes[_indice].firstChild.nextSibling.firstChild.nodeValue; imagen = noticias_xml.firstChild.childNodes[_indice].lastChild.firstChild.nodeValue; _root.mensaje_txt.htmlText = ""; _root.mensaje_txt.htmlText += "<p align='center'><font color='#006633' size='12'><b>"+titulo+"</b></font></p>"; _root.mensaje_txt.htmlText += "<p><font size='10'>"+mensaje+"</font>"; _root.mensaje_txt.htmlText += "<font color='#666666' size='10'>Publicado: "+fecha+"</font></p>"; _root.pantalla_mc.loadMovie(imagen); } siguiente_btn.onPress = function() { if (noticias_xml.firstChild.childNodes[indice+1] != null) { indice++; cargarDatos(indice); } }; anterior_btn.onPress = function() { if (noticias_xml.firstChild.childNodes[indice-1] != null) { indice--; cargarDatos(indice) } }; indice = 0; noticias_xml = new XML(); noticias_xml.ignoreWhite = true; noticias_xml.load("noticias.xml"); noticias_xml.onLoad = function() { cargarDatos(indice); };
Thanks, I don´t know to change the code AS2 to AS1.




Reply With Quote