1

私はここで愚かな何かが欠けていることを知っています。誰かが手を差し伸べることができますか?mcs をミュートして非表示にしようとしています。私はサウンド変換ビットで何か間違ったことをしました。AS3 ではかなり新しい。

var isPlayingMC:MovieClip =mc1;; 
var isPlayingMCcurrentFrame = 0;

var soundTr:SoundTransform = new SoundTransform();
soundTr.volume = 1;

btn1.addEventListener(MouseEvent.CLICK, playMC1); 
function playMC1(e:MouseEvent):void {

    isPlayingMCcurrentFrame = isPlayingMC.currentFrame; 
    isPlayingMC = mc1; 
    isPlayingMC.gotoAndPlay(isPlayingMCcurrentFrame);
    mc2.volume = 0;
    mc3.volume = 0;
    mc3.visible = false;
    mc2.visible = false;
    mc1.visible = true
}

btn2.addEventListener(MouseEvent.CLICK, playMC2); 
function playMC2(e:MouseEvent):void {

    isPlayingMCcurrentFrame = isPlayingMC.currentFrame; 
    isPlayingMC = mc2; 
    isPlayingMC.gotoAndPlay(isPlayingMCcurrentFrame);
    mc1.volume = 0;
    mc3.volume = 0;
    mc1.visible = false;
    mc3.visible = false;
    mc2.visible = true

} 
Btn3.addEventListener(MouseEvent.CLICK, playMC3); 
function playMC3(e:MouseEvent):void {
    isPlayingMCcurrentFrame = isPlayingMC.currentFrame; 
    isPlayingMC = mc3; 
    isPlayingMC.gotoAndPlay(isPlayingMCcurrentFrame);
    mc1.volume = 0;
    mc2.volume = 0;
    mc1.visible = false;
    mc2.visible = false;
    mc3.visible = true
    }
4

1 に答える 1

0

単純なプロパティがないため、実際に yourSoundTransformをsに適用する必要があります。MovieClipvolume

var st1:SoundTransform = new SoundTransform();
st1.volume = 0;
mc1.soundTransform = st1;

関連する参照ドキュメントは次のとおりです

于 2013-06-21T18:53:08.343 に答える