0
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);
4

3 回答 3

0
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);
于 2013-02-05T02:22:24.790 回答
0

要更改声音的音量,请将第三行替换为:

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

哦,你必须拥有它,以便在你改变它的属性后播放声音,所以移动morningChannel = morning.play ();到最后。

于 2013-02-04T03:53:23.610 回答
0

您必须在播放声音之前应用转换 =) morning.play 应该是最后一行。

于 2013-02-04T03:54:06.130 回答