在Actionscript-2中为流视频静音所有声音

时间:2011-03-22 21:42:16

标签: actionscript-2 cs3 netconnection

所以我试图将流式视频静音。现在我正在使用同一目录中的一个。

var flvURL = 'flvInThisDirectory.flv'; 
var netConn:NetConnection = new NetConnection();   
netConn.connect(null);   
var netStream:NetStream = new NetStream(netConn);   
my_video2.attachVideo(netStream); 
    netStream.setBufferTime(0);
    netStream.play(flvURL);  

    //all of the below are different, supposedly valid attempts to mute sound for 
    //this stream.. none of them work

    var nsst = new SoundTransform(0);
    nsst.volume = 0;
    netStream.soundTransform=nsst;
    netStream.fromSrvr.attachAudio(false);
    var so = new Sound(netStream); 
    so.setVolume(0);    
    stopAllSounds(); 

但仍有声音。如果URL也是远程的,这也是相同的。有任何想法吗?

1 个答案:

答案 0 :(得分:0)

Woops。

“var so = new Sound(netStream);”

将其变为

“var so = new Sound();”

甚至不会给自己一点。