flex how to control the audio volume of a video

By : Omu
Source: Stackoverflow.com
Question!

i have something like this

 private var video:Video;
  ...
 private function init():void {
           ...

            nc = new NetConnection();
            nc.connect(null);

            ns = new NetStream(nc);
            ns.play("my flv url");
            ns.client = nsClient;

            video = new Video();
            video.attachNetStream(ns);
            videoDisplay.addChild(video);
        }

which property should i change or bind a slider to in order to be able to change the sound volume ?

By : Omu


Answers

You should use the VideoDisplay object, which has a volume property.

By : robmcm


you can set it like this in AS3 VideoDisplay.voulme = 0.5;

else in MXML style you can do as shown here along with a binded slider.

http://blog.flexexamples.com/2008/08/24/setting-the-volume-on-a-videodisplay-control-in-flex/#more-762

By : shivaspk


This video can help you solving your question :)
By: admin