Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/03/2008, 11:26
kaquna
 
Fecha de Ingreso: agosto-2007
Mensajes: 130
Antigüedad: 16 años, 8 meses
Puntos: 0
duplicar mc con AS

hola

estoy trabajando en un cargador de noticias a traves de un fichero XML y tengo el siguiente codigo:

Código:
miXML = new XML()
miXML.ignoreWhite = true
miXML.load("noticias.xml")
miXML.ref = this
miXML.onLoad = function(succes){
	if(succes){
		var root = this.firstChild
		nodes = root.childNodes
		for(var i=0; i<nodes.length; i++) {		
			this.ref["titulo_txt"+i].text = nodes[i].attributes.name
			subnodes = nodes[i].childNodes
			this.ref["comentario_txt"+i].text = subnodes[0].firstChild.toString()
			this.ref["imagen_mc"+i].loadMovie(subnodes[1].firstChild.toString())
		}
	} else trace("Error al cargar el documento XML")
}
stop()
si tengo 50 noticias en el documento XML he de crear 50 cajas de texto + 50 mc para alojar las imagenes.

se puede hacer que, segun el numero de noticias del XML se creen x cajas de texto y mc?

milchisimas gracias