2 Replies Latest reply on Jul 27, 2009 1:17 PM by nati8oy

    FLV default audio state


      And another quick one. How do you set an FLV player to be muted automatically on load? I know how to make the volume 0 on load but I actually want to set the mute button state to muted so the user can click on it to unmute it.


      Thanks in advance...

        • 1. Re: FLV default audio state
          robdillon Most Valuable Participant

          Have a read through this: http://www.actionscript.org/forums/showthread.php3?t=167051 , it should give you something to start with.

          • 2. Re: FLV default audio state
            nati8oy Level 1

            Thanks Rob for the help however I managed to get a little more help from a friend on this subject - which ultimately lead to this code (where 'media' refers to the instance name of the FLV player):


            var changedVolume:int=0;


            media.addEventListener(VideoEvent.READY, configFlvPlayer);


            function configFlvPlayer(e:VideoEvent):void {


                      media.muteButton.addEventListener(MouseEvent.CLICK, toggleVolume);

                      function toggleVolume(e:MouseEvent):void {

                      media.volume = changedVolume = (int(!changedVolume));




            This FLV player simply starts out muted, then when the mute button is clicked, the volume comes back on. That was unnecessarily difficult!


            I'd like to send a special thanks to the very helpful Raz who has some awesome blog posts on flash stuff that can come in very handy: http://www.razpeel.com/blog/