1 Reply Latest reply on May 13, 2015 7:51 AM by kglad

    Imported flv sound off ?

    9870172

      Hello!. I'm working with Adobe Flash CS6. I'm creating banner with imported video. I imported in banner video with this code:

       

      var connection_nc:NetConnection = new NetConnection(); connection_nc.connect(null); var stream_ns:NetStream = new NetStream(connection_nc); my_video.attachVideo(stream_ns); stream_ns.play("http://lv.adocean.pl/files/pdrkprnhmv/olohqukqxq/KPF_video.flv");//тут вписать _root.vlink

       

      In my banner also have two buttons:
           1) one stops video sound

      on (release) { var PlayingSound:Sound = new Sound(); PlayingSound.setVolume(0); }

         

           2) other plays video sound

      on (release) { var PlayingSound:Sound = new Sound(); PlayingSound.setVolume(100); }

       


      I dont know how to set that video plays without sound.
      I would like that, when i open my banner, sound is off, and then with button help i can turn on and off video sound.

        • 1. Re: Imported flv sound off ?
          kglad Adobe Community Professional & MVP

          don't attach code to objects.

           

          and if you want to mute and unmite, use:

           

           

          var connection_nc:NetConnection = new NetConnection(); connection_nc.connect(null); var stream_ns:NetStream = new NetStream(connection_nc); my_video.attachVideo(stream_ns); stream_ns.play("http://lv.adocean.pl/files/pdrkprnhmv/olohqukqxq/KPF_video.flv");//тут вписать _root.vlink

          var PlayingSound:Sound = new Sound();

          stopsound_btn.onRelease=function()PlayingSound.setVolume(0);}

             

          startsound_btn.onRelease=function{PlayingSound.setVolume(100); }