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/