Flex如何控制视频的音量
我有这样的代码:
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);
}
我应该更改或绑定滑块到哪个属性才能更改音量?
I have code 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可以在AS3 VideoDisplay.voulme = 0.5中这样设置;
否则,在 MXML 样式中,您可以按照此处所示的方式以及绑定的滑块进行操作。
http://blog.flexexamples.com/2008/08/24/setting-the-volume-on-a-videodisplay-control-in-flex/#more-762
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
您应该使用VideoDisplay 对象,它具有volume 属性。
You should use the VideoDisplay object, which has a volume property.