請問各位大大:
SoundChannel.soundTransform 與 SoundTransform的差異性在哪呢?
我簡單測試了一下:
var sound:Sound = new Sound();
sound.load(new URLRequest("music.mp3"));
var myChannel:SoundChannel = new SoundChannel();
var mytransform:SoundTransform = new SoundTransform();
stage.addEventListener(MouseEvent.CLICK,go)
myChannel = sound.play();
function go(event:MouseEvent){
var aa = myChannel.soundTransform;
aa.volume -=0.1;
myChannel.soundTransform = aa;
}
與
var sound:Sound = new Sound();
sound.load(new URLRequest("music.mp3"));
var myChannel:SoundChannel = new SoundChannel();
var mytransform:SoundTransform = new SoundTransform();
stage.addEventListener(MouseEvent.CLICK,go)
myChannel = sound.play();
function go(event:MouseEvent){
mytransform.volume-=0.1;
myChannel.soundTransform = mytransform ;
}
看起來 SoundChannel 裡的 soundTransform,與 SoundTransform 沒什麼差異...
但是實際上這兩個的關係真的沒差嗎...?