Get GSAP

Version: 1.13.1 updated 2014-07-22

Core

    Extras

      Plugins

        By using GreenSock code, you agree to the terms of use.

        Jump to content

        Codepen Notification

        You didn't provide a codepen sample that illustrates the problem. It really helps us quickly identify problems. This isn't mandatory, but it will get you better/faster results. Would you like to add one?

        Volume fade outs

        Started by Big Bad Roo , Jun 23 2011 11:31 PM - - - - -

        2 replies to this topic
        Big Bad Roo

          Advanced Member

        • Big Bad Roo
        • 40 posts

        Post #1 by Big Bad Roo , 23 June 2011 - 11:31 PM

        Hi Jack

        I'm using TweenMax to fade out a sound channel when a user hits a stop button:

        TweenMax.to(soundChannelBG, 1, {volume:0});

        I was wondering how to tell Flash to soundChannelBG.stop(); once the fadeout tween is complete, rather than just turning the volume to zero?

        Thanks for your time and help.

        Shaun Thomson
        • Back to top

        Carl

          Administrator

        • Carl
        • 4,670 posts

        Post #2 by Carl , 23 June 2011 - 11:47 PM

        use an onComplete callback:

        TweenMax.to(soundChannelBG, 1, {volume:0, onComplete:stoSount});
        
        
        function stopSound(){
        soundChannelBG.stop();
        }

        • Back to top

        Big Bad Roo

          Advanced Member

        • Big Bad Roo
        • 40 posts

        Post #3 by Big Bad Roo , 26 June 2011 - 07:27 AM

        Thanks so much Carl - that solved the problems beautifully.

        I appreciate your help.

        Shaun
        • Back to top




        0 user(s) are reading this topic

        0 members, 0 guests, 0 anonymous users