PDA

View Full Version : Load XML Data & Search


puthisorn
05-04-2004, 03:09 PM
I'm using MX 2004.
I'm making music player that take information from XML. I use the button component(Search) to submit the variable from combobox(genre) and myTunePHP. And, reload the XML data from new url, after I click button it's show the undefine variable from combobox. I don't know why, please help. I also don't know that I write the script correct to reload XML data into SongList. Help!

Download MyTunes.zip (http://putputty.com/Flash/MyTunes.zip)

Frame1 script
var myTunePHP = 'http://malevich.scam.ecu.edu.au/myTunes/mytunes.php';
myXML = new XML();
myXML.onLoad = MyTunesXML;
myXML.ignoreWhite = true;
myXML.load(myTunePHP);

ComboBox(Genre)
on (change) {
_parent.SearchType = _root.Genre.selectedItem.data;
_parent.SearchString = _root.Genre.selectedItem.label;
trace(_parent.SearchString);
}

Button(search)
on(click) {
var cmdLabel = '?cmd=' + _parent.SearchType;
var cmdValue = '&val=' + _parent.Searchstring;
trace(_root.myTunePHP + cmdLabel + cmdValue);
myXML.onLoad = MyTunesXML;
myXML.ignoreWhite = true;
myXML.load(_root.myTunePHP + cmdLabel + cmdValue);
}

issamneo
05-05-2004, 11:01 AM
hi man i really don't understand what you want but if your problem is flash and XML explain to me what you need and i will help you
if it's flash and php i've any idea

issamneo
05-06-2004, 12:29 PM
this is the file
i repeat it works only for the first attributes
because labels and data are properties and you put only one in data and many in labels for the first you will find your data and your labels for the rest you will find only labels
enjoy ;)