Código:
var nc:NetConnection = new NetConnection(); var nc.connect(null); var ns:NetStream = new NetStream(nc); my_video.attachNetStream(ns); var vlist:XML = new XML(); vlist.ignoreWhite = true; vlist.onLoad = function() { var videos:Array = this.firstChild.childNodes; for(i=0;i<videos.length;i++) { videoList.addItem(videos.attributes.desc,videos.attributes.url); } ns.play(videoList.getItemAt(0).data); videoList.selectedIndex = 0; } var vidList:Object = new Object(); vidList.change = function() { ns.play(videoList.getItemAt(videoList.selectedIndex).data); } videoList.addEventListener("change",vidList); vlist.load("videos.xml");