![]() ![]() | |
Flash Player 5。
my_sound.setPan(pan);
pan 一个整数,指定声音的左右均衡。有效值的范围为 -100 到 100,其中 -100 表示仅使用左声道,100 表示仅使用右声道,而 0 表示在两个声道间平均地均衡声音。
一个整数。
方法;确定声音在左右声道(扬声器)中是如何播放的。对于单声道声音,pan 确定声音通过哪个扬声器(左或右)进行播放。
下面的示例创建一个 Sound 对象 my_sound,并从库中为其附加具有标识符 L7 的声音。它还调用 setVolume() 和 setPan() 来控制 L7 声音。
onClipEvent(mouseDown) {// 创建一个声音对象my_sound = new Sound(this);// 从库中附加声音my_sound.attachSound("L7");//将音量设置为 50%my_sound.setVolume(50);//关闭右声道中的声音my_sound.setPan(-100);//从声音的第 30 秒开始播放并播放 5 遍my_sound.start(30, 5);
Sound.attachSound()、Sound.setPan()、Sound.setTransform()、Sound.setVolume()、
Sound.start()
![]() ![]() | |