@cyrstem wrote:
hey just need a little help im building a dropdown list that will load music files
and they play when selected i will like them to stop playing when other files is selected in the same dropdown
so the code is like this
void ofApp::onDropdownEvent(ofxDatGuiDropdownEvent e){
if (e.target->getEnabled()==true){sounds[e.child].play(); cout<<"numero"<<e.target->getIndex()<<endl; }
how can i make the selected sound to stop
i try this way but can't make it workif (e.target->getEnabled()==false) { sounds[e.child].stop(); }
Posts: 4
Participants: 3