How to raise an event when all the sounds in a soundchannel ends

I have a soundchannel and I play a lot of sounds in there, but I need the fulfillment of any audio file within this channel to be followed by a two second wait, and then trigger an event. How can I do this?

When the SoundChannel object is complete, there is a soundComplete event gets dispatched (Event.SOUND_COMPLETE).  Its assign a listener for the event.  If you need more information, the Flash help documentation has everything.

Tags: Adobe Animate

Similar Questions

  • How to raise an event when the user have clicked all the buttons (in random order)?

    Greetings,

    I want to trigger an event (frame 2 goto and stop) after all my 3 user buttons were clicked in no particular order.

    I have 3 buttons on the stage, image1. (instence names: MCBlue, MCRed, MCYellow)

    How can I write my code?

    Here's what I have, but it does not at all. I'm so confused.

    I thank very you much for your time.

    [code]:

    import flash.events.Event;
    import flash.events.MouseEvent; 
    
    stop();  
    
    MCRed.addEventListener(MouseEvent.CLICK,redReady);
    MCBlue.addEventListener(MouseEvent.CLICK,blueReady);
    MCYellow.addEventListener(MouseEvent.CLICK,yellowReady);
    
    function redReady(event:MouseEvent):void
    {
              MCRed.MouseEvent.CLICK();
    }
    
    function blueReady(event:MouseEvent):void
    {
              MCBlue.MouseEvent.CLICK();
    }
    
    
    function yellowReady(event:MouseEvent):void
    {
              MCBlue.MouseEvent.CLICK();
    }
    
    
    var buttons:Array = [redReady, blueReady, yellowReady];
    var sequence:Array = [];
    var correct:int;
    
    
    addEventListener(Event.ENTER_FRAME, gotoFrame);
    
    
    function gotoFrame(e:MouseEvent):void {
              if (buttons.indexOf(e.target) == sequence[correct]){
                        gotoAndStop(2);
              }
    }
    
    

    If the buttons are movieclip symbols, then a way to solve it would be to set a property of each button to be true, when everyone gets clicked and then have a function that you call who checks this property for all buttons.  When all the true test is when you switch to the 2 structure.  Something like...

    import flash.events.Event;
    import flash.events.MouseEvent;
    
    stop();  
    
    MCRed.addEventListener(MouseEvent.CLICK,redReady);
    MCBlue.addEventListener(MouseEvent.CLICK,blueReady);
    MCYellow.addEventListener(MouseEvent.CLICK,yellowReady);
    
    MCRed.clicked = false;
    MCBlue.clicked = false;
    MCYellow.clicked = false;
    
    function redReady(event:MouseEvent):void
    {
              MCRed.clicked = true;
              gotoFrame();
    
    }
    
    function blueReady(event:MouseEvent):void
    {
              MCBlue.clicked = true;
              gotoFrame();
    }
    
    function yellowReady(event:MouseEvent):void
    {
              MCYellow.clicked = true;
              gotoFrame();
    }
    
    function gotoFrame():void {
              if(MCRed.clicked && MCBlue.clicked && MCYellow.clicked){
                        gotoAndStop(2);
              }
    }
    
  • How to raise an event when a file is created.

    Hello!
    I need labview wait until a file is created in a certain folder (by the other program) and then to perform a task.

    Is this possible?

    I have no idea how to implement it.

    Thank you!

    Use the file Info feature.  From time to time, repeat until you do not get an error.

    I saw an example somewhere where someone used .NET to get an event when a file has changed.  I have no idea where he is or how it was done however.

  • Is it possible to cut all the sounds and haptic feedback when the iPhone is connected to Carplay Apple?

    Is it possible to cut all the sounds and haptic feedback when the iPhone is connected to Carplay Apple?

    While driving, I noticed that all the comments navigation are also sent to my phone, creating a distraction while driving. Is there an automatic way to stop sending alerts to my watch whil the iPhone is also connected to Carplay?

    If this is not the case, consider this as your comments/request. If there is, please share. I do not want to switch manually and on all notifications when you use Carplay.

    Best regards

    Q

    Hello

    It may help to place your watch in mode do not disturb before driving:

    -On your watch: when the time display, drag upward on the dial of the watch > drag left/right to the gaze of settings > tap the moon to turn do not disturb on and outside.

    You can also disable mirroring for do not disturb mode. When mirroring is enabled, turning on do not disturb on your watch also automatically her allow on your iPhone.

    -On your iPhone, in the application of Eve, go to: Watch My > General > do not disturb - turn the market / stop iPhone mirror.

    To send comments and/or service requests to Apple, you can submit the form here (all comments are read):

    https://www.Apple.com/feedback/watch.html

    (This is a supportive community focused on user - you don't talk to Apple here).

  • How can I get rid of all the unnecessary since files on Firefox?

    How can I get rid of all the Junk I've met since going with Firefox?

    What useless files are you referring?

  • How can I prevent investigations arise all the time?

    investigations

    How can I prevent investigations arise all the time

    Hi judylambeth,

    ·         Are what studies you referring?

    ·         What web browser do you use?

    ·         Did you do changes on the computer before the show?

    Response with more information to help you further.

    You can also view the article.

    Suggestions for a question on the help forums

  • How to boost my computer without all the fuss?

    * Original title: Boost from Windows 7

    How to boost my computer without all the fuss?

    Please note that if you put a link to virus, I would report.

    Thanks in advance.

    See this:

    http://www.askvg.com/master-tutorial-to-make-your-Windows-7-Super-fast/

  • BlackBerry smartphone how to cut all the sounds?

    Hello.

    I have a v5.0.0.400 (Platform 5.1.0.110) 9700 "BOLD"

    I always keep my phone on vibrate - I prefer this way I can be discreet and meet my convienience.

    I put an alarm the other day and was shocked to discover that she played an alarm bell.

    I also wanted to watch a movie in silence, but it wouldn't let me, and started playing the track despite me thinking I had all the sounds.

    Is there a master setting to cut all the sounds, period?

    If this is not the case, how could I do to at least the alarm sounds?

    Thanks in advance for the help.

    No, there is not a master setting.

    The alarm... set your alarm in the clock settings > Options > set alarm in Silent, or with or without vibration.

    For the film, simply adjust the volume down to nothing.

  • How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?

    Hello

    How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?

    Thank you

    Jay.

    Select the connection and right-click on it and select schema statistics collection

  • When I visit the link to download Adobe acrobat, the button says 'Subscribe now' when all the tutorials say to read 'download now '. Help, please!

    When I visit the link to download Adobe acrobat, the button says 'Subscribe now' when all the tutorials say to read 'download now '. Help, please!

    Hello

    Please try and download Acrobat from the following link: https://helpx.adobe.com/acrobat/kb/acrobat-downloads.html

    Kind regards

    Shipti

  • How to run a script for all the images in a folder?

    How to run a script for all the images in a folder?

    You can assign your script to an action, then use processor by batch or image with the option apply to all subfolders.

  • When deleting a long shot in CS4 editing all the sound elements don't is not loading

    I've seen similar issues here, but the solutions don't have not helped me.  Sometimes, I'm kicking speech or concerts where the source video is up to one hour in one take.  I usually capture all the sound elements of a CAM camera and sync on the timeline.  Sometimes, when I bring the master stroke down in the timeline, the full video will be available instantly, but only a few minutes the audio will load.  Sometimes, I left for a few minutes, assuming that it takes time for the audio load, and sometimes it works.  But, today, for the second time, I just get the first 3 of 45 minutes of audio.  The graphic track on the timeline shows the presence of the audio and I can get it in preview, for a few seconds at a time.

    Any suggestions?

    I use CS4 ver 4.0 Ironside

    PC - ASUS P6T deluxe V2 Core 17

    INITEL 17-940 2.93GHZ processor Core

    Black card magic Audio

    Windows Vista Business 64 bit OS

    For imported files, one must allow Audio Conform completely, before making any change. This ARTICLE will give you general information.

    I hope that's all that happens, and good luck,

    Hunt

  • How to read a file of all the text in a pl/sql variable?

    Hi, I need to read an entire text file - which actually contains an e-mail message from a system of content management - in a variable in a pl/sql package, in order to insert the database information and then send the email. I want to read the whole of a sudden text file, no not one line at a time. Shoud I use Utl_File.Get_Raw or is there a more appropriate to do this?

    How to read a file of all the text in a pl/sql variable?

     ...
    your_clob_variable := dbms_xslprocessor.read2clob('YOUR_DIRECTORY','YOUR_FILE');
    ....
    
  • How to stop all the sounds of root

    Sorry I'm a newvby in Actionscript.  I found the following script for a button that allow me to stop all the mc inside the root, but I need to stop all the sounds of the root as well.

    Any help is appreciated.


    Thank you

    on {(press)
    getAllMc (_level0);
    function getAllMc (mc) {}
    for (var i in mc) {}
    If (typeof mc [i] == "movieclip") {}
    MC [i]. Stop();
    getAllMc (mc [i]);
    }
    }
    }
    }

    You can use the stopAllSounds() function

  • microphone captures all the sounds around him

    When I'm on steam or just using my headset when I talk, I hear other sounds around me how can I fix problem cause it's hard to play games on my laptop cause my choice of microphone, all the sounds around me. my lap top is a Lenovo 2013 windows 8-os h.d. 427 GB not touch scree. Please help asap thank you

    Hello Mary,.

    Thanks for posting your question on the Microsoft community.

    Thank you for details on the issue.

    This problem can occur because the parameters or corrupt device drivers.

    I suggest you Start convenience store audio and check if that helps. Please follow these steps:

    a. press Windows + C keys and click on Search.
    b. type Troubleshooting in the search box, click on it in the search results.
    c. click on "display all" and then click on 'Audio'.
    d. click on 'Next' and follow the on-screen instructions.

    Please also updated audio driver from the site Web of the manufacturer of the computer and the check.

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

Maybe you are looking for