snd. function()

{

  //same body here

});

 

You’re having scoping problems.

 

Matt

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tom Fitzpatrick
Sent: Tuesday, July 26, 2005 2:30 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] sound problem: onSoundComplete

 

Trying to get onSoundComplete() to work - but it never seems to get called.

Here's the code I'm working with:

      function startSound(currentSound)
      {
            feedback.text += currentSound+" playing now";
            glow.alpha = 100;
                  var snd:Sound = new Sound();
                  snd.attachSound(currentSound);
            snd.>
            {
                  glow.alpha = 0;
                  feedback.text += " stopping now";
            }
                  snd.start();
      }

The "currentSound" parameter is the name of an mp3. The startSound function
is called as the change event from a comboBox used to select the sound to
be played. The sound gets played just fine, but the onSoundComplete
function never executes.

The "feedback.text" mechanism is a trace - and the text "stopping now"
never gets called.

The "glow" object is an imported .swf whose alpha is supposed to change
when the sound is complete.

- Tom







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to