Skip to main content
Inspiring
March 15, 2024
Question

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

  • March 15, 2024
  • 1 reply
  • 7184 views

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?

 

    This topic has been closed for replies.

    1 reply

    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

    what about the stop


    i don't know how you're determining what should play and what should not.