PDA

View Full Version : 'change' event of list component


silentweed
11-20-2005, 08:32 PM
Hi guys/gals. Ive made an xml/list component driven mp3 player as can be viewed at http://www.flashmatics.co.uk/blog/samples/mp3xml/mp3player.html

When someone selects a new song from the list that songs starts to play. Everything is working fine.

I now want to add an extra bit of functionality i.e When one song finishes i want the next song to start playing. But this means I have to tell the list component that a change has occured as well (even though there has been no user interaction to cause this 'change'). How would I go about this. Here is a snippet of relevant code.


mySound.onSoundComplete = function():Void{

//from here i need to tell the component a change has occured and to move it
//to the next song in the menu
}


//create a listener for the list component
var compListener:Object = new Object();
list_comp.addEventListener("change", compListener);

compListener.change = function(info:Object):Void{
//how do i get this to move to the next track?
}



Thanks for any help in advance. I dont actually need the whole code or anything but rather a point in the right direction..cheers