Ver Mensaje Individual
  #5 (permalink)  
Antiguo 30/05/2007, 12:52
Rizzo
 
Fecha de Ingreso: septiembre-2006
Mensajes: 1.193
Antigüedad: 17 años, 7 meses
Puntos: 30
Re: Links creados dinámicamente

mete esto en un frame vacio

Código:
var doc:XML = new XML();
doc.ignoreWhite = true;
doc.load("lista.xml");
//
doc.onLoad = function() {
	var largo:Number = this.firstChild.childNodes.length;
	//
	for (var i = 0; i<largo; i++) {
		//
		ref = _root.createTextField("hola"+i, _root.getNextHighestDepth(), 400, i*25+100, 200, 20);
		//
		var nombres:String = doc.firstChild.childNodes[i].attributes.nombre;
		//
		var link:String = doc.firstChild.childNodes[i].firstChild.nodeValue;
		//
		ref.html = true;
		//
		ref.htmlText = '<a href="'+link+'" target="_blank">liga'+nombres+'</a>';
		//

	}
	//
};
y pon esto en un xml llamalo lista.xml


Código PHP:
<ligas>

<
liga nombre='google uno' >http://www.google.com.mx</liga>
<liga nombre='google dos' >http://www.google.com.mx</liga>
<liga nombre='google tres' >http://www.google.com.mx</liga>
<liga nombre='google cuatro' >http://www.google.com.mx</liga>
<liga nombre='google cinco' >http://www.google.com.mx</liga>
<liga nombre='google seis' >http://www.google.com.mx</liga>

</ligas
si tienes dudas aprieta f1 y checa para aque sirve cada metodo si sigues teniendo dudas vienes y preguntas.