Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/05/2010, 23:45
gedes
 
Fecha de Ingreso: mayo-2010
Mensajes: 6
Antigüedad: 14 años
Puntos: 0
Leer ultimo nodo de xml

hola amigos de foros del web , espero puedan darme un mano realmente no conosco mucho de action script , tengo un reproductor de video que lee nodos de un xml , pero lo hace obiamente desde arriba hasta el ultimo nodo, mi intension es que lea desde el ultimo o sea desde abajo hacia arriba

espero puedan darme una mano


Código:
//xml stuff
var myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(){
	theVideos = [];
	whoIsOn = 0;
	nodes = this.firstChild.childNodes;
	for(var i=0;i<nodes.length;i++){
		theTitles.push(nodes[i].childNodes[0].firstChild.nodeValue);
		theVideos.push(nodes[i].childNodes[1].firstChild.nodeValue);	
		theDetails.push(nodes[i].childNodes[2].firstChild.nodeValue);
	}
	loadMenu();
	if(_root.autoplay != "false"){
		loadInterval2 = setInterval(checkPlayerLoaded2, 250);
	}
}

if(_root.playlist){
	myXML.load(_root.playlist + ".xml");
}else{
	myXML.load("mylist.xml");
}

var listener:Object = new Object();
listener.tmc = target;
listener.onLoadInit = function(mc:MovieClip) {
	new Tween(mc,"_alpha", Strong.easeOut,0,100,1,true);
	mc._width = 65;
	mc._height = 50;
};
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(listener);

overlayBtn.useHandCursor = false;
overlayBtn._visible = false;

var btnOver;
var butArray:Array = new Array();
function loadMenu(){
	for (var i:Number=0;i<theTitles.length;i++){
		var but:MovieClip = listBox.theList.attachMovie("listItem","listItem"+i,i,{_y:(i*60)});
		but.theName.htmlText = theTitles[i];
		but.theDescription.htmlText = theDetails[i];
		loader.loadClip("http://img.youtube.com/vi/" + theVideos[i] + "/2.jpg", but.theThumbnail);
		but.i = i;
		butArray.push(but)
		if((i & 1) == 0){
			var my_colorB1:Color = new Color(but.itemBg);
			my_colorB1.setRGB(0xF7F7F7);
		}else{
			var my_colorB1:Color = new Color(but.itemBg);
			my_colorB1.setRGB(0xF1F1F1);
		}
el codigo sigue pero no creo que sea importante lo que sigue, gracias