El siguiente es que no hace la lista cuando la publico en HTML, la lista funciona solo como fichero-swf.
Eso...si me pueden ayudar..por favor
[code]
// import this so it can be used to set the scope of the combobox listener and the xml onload routine
import mx.utils.Delegate;
// declare variables
var people:Array;
var update:String;
var dirpath:String;
// create a new color object to associate with the bgcolor movieclip
var bgcol:Color;
// set up the XML instance
var peoplexml:XML = new XML();
// initialize items on stage
_global.style.setStyle("fontFamily", "Verdana");
_global.style.setStyle("fontSize", 11);
// define what should happen when the XML loads
// (read data into update, dirpath, and people variables)
function onXmlLoaded(success:Boolean) {
if (success) {
// make a handle to the root node in the xml
var mainnode:XMLNode = peoplexml.firstChild;
update = mainnode.attributes.lastupdate;
dirpath = mainnode.attributes.dir;
// set up an array of all person nodes
var peoplenodes:Array = peoplexml.firstChild.childNodes;
for (var i:Number = 0; i < peoplenodes.length; i++) {
// for each person node:
var personnode:XMLNode = peoplenodes[i];
people.push(
{i:i+1,
pname:personnode.attributes.name,
bgcolor:parseInt(personnode.attributes.bgcolor, 16),
photo:personnode.attributes.photo,
// bgswf:personnode.childNodes[0].attributes.url,
desc:personnode.childNodes[0].firstChild.nodeValue,
resumen:personnode.childNodes[2].firstChild.nodeValue,
note:personnode.childNodes[1].firstChild.nodeValue,
links:personnode.childNodes[3].firstChild.nodeValue
});
}
// data is all read and put in the right place -- now setup the screen
// using this data
setup();
} else {
trace('error reading XML');
}
}
function setup() {
// set up chooseperson dropdown
chooseperson.labelField = "pname";
chooseperson.dataProvider = people;
chooseperson.addEventListener("change", Delegate.create(this, loadScreen));
}
function loadScreen(evt:Object) {
var thisitem:Object = evt.target.selectedItem;
ta.text = thisitem.desc;
ta2.text = thisitem.resumen;
ta3.text = thisitem.note;
ta.vPosition = 0;
bgcol.setRGB(thisitem.bgcolor);
}
function init() {
// initialize the people array
people = [{pname:"Choose one"}];
// set up the xml instance to ignore whitespace between tags
peoplexml.ignoreWhite = true;
// set the scope of the onLoad function to the main timeline, not peoplexml
peoplexml.onLoad = Delegate.create(this, onXmlLoaded);
// initialize the bgcol color variable by associating it with the background movieclip
bgcol = new Color(bgcolor);
var rand:Number = Math.round(Math.random() * 2);
//peoplexml.load("daten/bernd.xml"+"?rand=" + rand);
peoplexml.load("daten/bernd.xml");
}
init();
[/code]
