I have a Flex app that shows a datgrid with a list of artist names(from my mp3 collection on my hard disk). When I click on a chosen name, the datgrid becomes invisible and another grid becomes visible. I want this new grid to show all the songs I have from this artist. The data for the first grid is in an xml file (names only). The songs are in another xml file (names and song titles). I use HTTPService to populate the first grid with names (using ArrayCollection) and this works fine. When I click on a name, I use a different HTTPService to retreive data from the second file. I use XMLListCollection as I want only the songs relating to the chosen artist. When I debug, event.result does indeed hold the XML objects (artists names and song titles), but the XMLList is empty. I can't figure out why. Can anyone help, please?
[Bindable] private var artists:ArrayCollection; [Bindable] private var songData:XMLListCollection = new XMLListCollection();
private function artistHandler(event:ResultEvent):void { artists = event.result.artists.name; }
private function songHandler(event:ResultEvent):void { var songResultData:XMLList = new XMLList(); songResultData = event.result.mp3.song; songData.source = songResultData; }