actionscript-3 - 我认为Soundtransform无法正常工作

标签 actionscript-3 audio

I am trying to lower the volume of this sound since it's like a background music track but it's sounding the same why is it and how can I fix it?

var morning:Morning1 = new Morning1();
var morningChannel:SoundChannel = new SoundChannel ();
var transforming:SoundTransform = new SoundTransform(0.1);
morningChannel = morning.play ();
morningChannel.soundTransform = transforming;

这才是真正的样子

最后工作:
var morning:Sound =new Morning1 ();
//telling the sound to lower
var transforming:SoundTransform = new SoundTransform(0.05);
var morningChannel:SoundChannel = morning.play(0,1,transforming);

最佳答案

要更改声音的音量,请用以下内容替换第三行:

var transforming:SoundTransform = new SoundTransform;
transforming.volume = 0.1;

哦,您必须拥有它才能在更改属性后播放声音,因此请将morningChannel = morning.play ();移到末尾。

关于actionscript-3 - 我认为Soundtransform无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14680061/

相关文章:

闪存到 C# 通信

iphone - 在iPhone上播放声音不起作用

flash - 将光标悬停在文本字段上

actionscript-3 - 更改 MovieClip 内 TextField 的字体颜色

c# - C# 中日期的日期字符串 - 星期几不正确

apache-flex - 获取特定组件上的所有事件监听器

ios - 如何快速播放来自http数据流的音频

ios - 如何在iphone应用程序中压缩音频文件

javascript - 使用 JavaScript 动态控制 HTML5 音频

javascript - 不要打开OGG文件