Skip to main content
Inspiring
March 15, 2024
質問

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

  • March 15, 2024
  • 返信数 1.
  • 7184 ビュー

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?

 

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

    返信数 1

    Inspiring
    March 15, 2024

    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
    March 16, 2024

    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();

     

    kglad
    Community Expert
    Community Expert
    March 16, 2024

    thats ok 

    thanks

    but where do i place?

    send me a print


    on your main timeline probably in button listeners.