Skip to main content
Inspiring
3月 15, 2024 8:55 午後 UTC
質問

why does it play both of audios together after some seconds in sheet music animation

hello there here i send atached the situation

its working the sheet music animation but

after some seconds it plays both audios

from movie clips....

whats the action script to use here in this situation

to stop the audio when the other plays?

 

    このトピックへの返信は締め切られました。

    返信数 100

    Inspiring
    3月 15, 2024 9:03 午後 UTC

    i found this

     

    sound.addEventListener(MouseEvent.CLICK, fl_ClickToStopAllSounds);

    var sc:SoundChannel;

     

    function fl_ClickToStopAllSounds(event:MouseEvent):void

     

    {

        SoundMixer.stopAll();

    var newSound:NewSound=NewSound();

    sc=newSound.play();

    }

     

    how is it used ? with the action script of the button?

    翻訳
    kglad
    Community Expert
    Community Expert
    3月 16, 2024 12:52 午前 UTC

    if you're playing your sounds by streaming the sound attached to a timeline, you just need to stop that timeline.  ie, 

     

    sound1_graphic.stop();

     

    翻訳
    Inspiring
    3月 16, 2024 9:58 午前 UTC

    i made movie clips and it worked........

    couldnt it be sound1_movieclip.stop();?

    thanks man

    翻訳