Q:

Trouble getting Event.Sound_Complete working between classes and OnMouse event

I am setting up a question/answer program with an audio response with feedback showing up telling the user how well they have done. I have two classes that help do this. A QuestAnswer Class that feeds all relevent question answer data, and a AddSound Class that is used to add appropriate audio. I wish to provide the feedback after the audio has completed. My code thus far:
QuestAnswer Class:
private function moEvent(e: MouseEvent): void {
            switch (e.type) {
                case "click":
                    customerResponse.addData(vce + responseAudio);
                    customerResponse.playCompleted(/*function parameter*/);//My goal is to get setIncDec() to play from this.
                    //
                    iniQuestion(e.currentTarget.name);// Scores Question, and resets data
                    setIncDec(e.currentTarget.name,e.currentTarget.getIncDec());// checks to see if feedback is enabled on this question
                    break;
            }
        }

As you can see the setIncDec is currently set on a e.currentTarget which gets the name of the answer clicked good,okay,bad, and boolean value, getIncDec(), that enables feedback, the two combined enables the attitude of the feedback and if feedback is shown at all. Here is my audio class so far...
AddAudio Class:
public function playCompleted(completeFctn:Function): void {
            sc = s.play();
            sc.addEventListener(Event.SOUND_COMPLETE,completeFctn);
        }

with this I am listening to when the audio is finished and then to display the feedback once the audio is finished. My issue is how would I get this to work on an e.currentTarget, or how could I get something similar set up to where I can accept an e.currentTarget value from a mouseEvent? Any help would be appreciated!

A:

In my sound class I have a sound channel playing and a Event.SOUND_COMPLETE event listener attached to my soundChannel. This piece of code is based on the assumption that you have a soundChannel already instantiated.
AddSound.as:
public function playCompleted(): void {
            s.addEventListener(IOErrorEvent.IO_ERROR,ioErrorHandler);//error handling, not needed
            sc = s.play();
            sc.soundTransform = st; //used for adjusting volume, not needed
            sc.addEventListener(Event.SOUND_COMPLETE,completed);
        }

I then create the handler, which dispatches the event that was placed into the particular class I need dispatched from. in this instance I created a "triggerFeedback" listener and this was placed in my QuestionAnswer Class:
private function completed(e:Event):void{
                dispatchEvent(new Event("triggerFeedback",true));
            }

QuestionAnswer.as:
I then created an instance of my AddSound class private var sound:AddSound = new AddSound();and created the "triggerFeedback" listener and added it to my sound variable:
sound.addEventListener("triggerFeedback", triggerFeedback);

 private function triggerFeedback(e: Event): void {
        //code executed when sound has completed.
        }

I'm sure there is probably a better way to do this but this was the way that worked for me. Hopefully this might help somebody.

