如何使用 ActionScript 获取所有演讲者的姓名



我不知道actionscript如何获得所有演讲者的名字,actionscript如何做到这一点?

我知道actionscript可以通过使用Microsoft.names获取麦克风名称列表

但是对于演讲者该怎么办呢?

像skype一样,它可以指定呼叫哪个扬声器,但如何actionscript实现相同的功能

我想你是指左右扬声器?如果是这种情况,请使用SoundTransform类和pan属性:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/SoundTransform.html

使用-1.0值将意味着您的声音将从左侧扬声器播放,而1.0值将意味着您的声音将从右侧扬声器播放。这就是我所知道的Skype正在做的。

// create our sound and play it, storing the SoundChannel created
var sound:Sound             = new Sound( new URLRequest( "../assets/myMusic.mp3" ) );
var channel:SoundChannel    = sound.play( 0, 10 ); // loops 10 times
// create our SoundTransform object
var st:SoundTransform = new SoundTransform( 1.0, 0.0 );
// add a stage listener for mouse click - we'll take the x position of the click
// and use it to set the pan
this.stage.addEventListener( MouseEvent.CLICK, function( e:MouseEvent ):void
{
    // sets the pan between -1.0 and 1.0 depending on where on the stage
    // important - we need to set the soundTransform property on the 
    // SoundChannel for our change to take effect
    st.pan                  = -1.0 + ( e.stageX / stage.stageWidth ) * 2.0;
    channel.soundTransform  = st;
    trace( "Set the pan to " + st.pan );
});

相关内容

最新更新