Ver Mensaje Individual
  #3 (permalink)  
Antiguo 07/02/2007, 12:25
maxima_web
 
Fecha de Ingreso: febrero-2007
Mensajes: 6
Antigüedad: 17 años, 2 meses
Puntos: 0
Re: Ayuda con lista de video

este es el codigo que estoy utilizando en el .fla


var nc:NetConnection = new NetConnection ();
nc.connect(null);

var ns:NetStream = new NetStream (nc);

theVideo.attachVideo (ns);

ns.play("barraza.flv");

stream.setBufferTime(10);

rewindButton.onRelease = function() {
ns.seek(0);
}

playButton.onRelease = function() {
ns.pause();
}

var videoInternal = setinterval(videoStatus,100);
var amountLoader:Number;

function videoStatus() {
amountLoader = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoader * 200;
}

// xml playlist
// create an XMl object
var vidList:XML = new XML();
// ignore white spaces
vidList.ignoreWhite = true;
vidList.onLoad = function() {
// put the nodes of xml into array
var videoArray:Array = this.firstChild.childNodes;
// iterate through video array
// and add videos to the listbox
for (var i = 0; i<videoArray.length; i++) {
videoList.addItem(videoArray[i].attributes.desc, videoArray[i].attributes.url);
}
// when xml is loaded play first item
ns.play(videoList.getItemAt(0).data);
// highlight first video in listbox
videoList.selectedIndex = 0;
};
// create a listener that responds
// to changes in the listbox
var vidListener:Object = new Object();
vidListener.change = function() {
// play the item selected in listbox
ns.play(videoList.getItemAt(videoList.selectedInde x).data);
};
// register the event listener to listbox
videoList.addEventListener("change", vidListener);
// load xml file
vidList.load("videos.xml");

y esto es en el .xml


<?xml version="1.0" encoding="ISO-8859-1" ?>
<videos>
<video url="tkd01.flv" desc="Girls paddling out" />
<video url="tkd02.flv" desc="Girls surfing" />
<video url="tkd03.flv" desc="Surfest Contest" />
<video url="tkd04.flv" desc="Tae Kwan Do" />
</videos>

me gustaria subir los archivos pero no se como....