Is there audio events aboard animate 3.0? -Need to know when an audio file stops

I'm working on a project where there is an audio playback button.  When the user clicks and audio playback, I want to show a version the button highlighted, but when the audio is finished, I want to emphasize to hide again.

I did successfully using the library of buzz.js, but I try to use anime new native audio support, and I hope I can do the same thing.  With buzz, I would like to do this...

ARM.bind ("pause", Function {}

SYM.$("play_arm").Attr("src","images/play_btn.png");

});

ARM.bind ("playing", Function {}

SYM.$("play_arm").Attr("src","images/stop_btn.png");

});

In this case, 'arms' is a variable that contains the audio, and I'm in the binder to the 'pause' and 'pay' events thrown by buzz.

This syntax does not work for the audio native, so I wonder if there is another way to do this, or if there is no usable event.

Any suggestions will be greatly appreciated.  Thank you!

Fred

I have it.

Instead of link the action to the event, you add an event listener. Then...

ARM.bind ("pause", Function {}

SYM.$("play_arm").Attr("src","images/play_btn.png");

});

becomes

arm.addEventListener ('complete', function() {}

...

});

You will also notice that I used "completed" instead of "pause".  My audio files are playing throughout of my current project, so 'done' is the best event.  'Break' also triggered at the end, then, really, that you can use.

Hope this helps someone who has the same problem.  Thank you!

Fred

Tags: Edge Animate

Similar Questions

  • ActionScript 3 coding to return to the homepage of 10 secs after audio file stops

    Hello..

    I am having some problems with my Flash project.

    At the moment it all works, but I need now to do something I've never done before.

    Basically, the user selects a page and the project can run through actionscript 3.0, coding, an audio file and displays the page right in the timeline.

    I have a return button which once typed will return to the home page.

    I now need to return to home page 10 dry after the audio file as well as keeping the function of the back button.

    What should I do?

    I can provide the coding I use if necessary.

    I am currently using Flash Pro CS6 on a PC Win 7 Pro.

    Thank you for your help

    Michael

    If you need both something happening you have a few choice items from the timer to choose.

    The less complicated would probably use the setTimeout() function and call the same function as the button uses.  You just need to assign the function of the event argument to null (as in: buttonFunctionName (evt:MouseEvent = null) function).

    Another option is to use the Timer class.

    These two options are documented in the help files if you need to find how to use them.

  • I want to know is there a way to know when a particular file excel was initially created

    I use microsoft Excel 2007

    Hello Dzi,

    Welcome to the Microsoft Answers Community!

    Try right click the Excel file, and then click Properties. When the document was created, modified and last time.

    Hope that helps, I look forward to hearing from you.

    Steven
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Is there any event generated when I move any window or windows media player from primary monitor to secondary monitor.

    Original title: media Player from the window of the main monitor to the secondary display.

    Hello

    Whem I'm moving my Windows Media Player fromprimary on secondary screen (or any other window),

    is there an event generated by the Windows operating system?

    If yes how can I capture this event?

    Best regards

    Sharad

    Hello

    There is no event that is generated when you move any program or any window from primary monitor to secondary monitor.

    For more information visit: How to view and manage the event logs in in Windows XP Event Viewer

  • I bought my dell studio with webcam 2010. Not long after that I bought the audio has stopped working. What is so frustrating, is that there is no troubleshooting feature...

    Why dell webcam is not a feature of troubleshooting? Is is just a piece of garbage that is thrown in to make believe that you get something of value?   the audio has stopped working shortly after I bought it and there is nothing that I found to try to recover

    Hi Susan,.

    1. are you able to hear the system sounds?

    2 are you facing any problem with Dell webcam?

    3. What is the number of the model of the computer?

    Method 1:

    Run the hardware and devices Troubleshooter and check if that helps:

    Hardware devices do not work or are not detected in Windows

    http://support.Microsoft.com/mats/hardware_device_problems/en-us

    Method 2:

    To resolve the problem with the sound, I suggest to refer to article and follow these steps:

    No sound in Windows

    If the problem is not resolved, please respond with more details.

  • Is there a Windows Media Player plugin which allows you to convert audio files from one type to another?

    Is there a Windows Media Player plugin which allows you to convert audio files from one type to another?
    For example: conversion of a

    1. file to a .mp3 file .m4a? Or a
    2. . M4P file to a .mp3 file, or a
    3. mp3 to a .mxmf file

    or visa / versa for any of them?

    Hello

    Thank you fo contact Microsoft Answers.

    Windows Media Player is not any plugin. Maybe you can try to Expression Encoder.

    Here:

    http://www.Microsoft.com/expression/products/Encoder4_Overview.aspx

    Or here:

    http://www.Microsoft.com/expression/products/EncoderPro_Overview.aspx

    Many third-party converters are also available, you can try.

  • Is there a way of compressing audio files to the smaller overall presentation?

    How can you make the file size smaller Adobe Presenter? Is it possible to compress audio files?

    Thank you!

    Hi Anita,.

    Once you insert the audio in your powerpoint using Presenter a folder is created in the same location where you saved your PowerPoint presentation. Inside that folder, there will be an Audio file and a Media.ppcx file. Inside of this Audio file, you will get all the audio files that you inserted into your presentation.

    Kind regards

    Ajit

  • Is there a way for EA to automatically save the audio files in the project and publish directories & json?

    Is there a way for EA to automatically save the audio files in the project and publish directories & json? Thank you

    Bob

    good edge would not copy all the external files that you have added to your project in the publication of record, you should only do copy paste your files and folders created by your self after publication!

    and I can not undrestand "Unlike you, I'm not that qualified and often make mistakes that make some of my totally useless code retries." You can save your project every time with the new name to have your previews works!

    and on the withdrawal of your symbols that uses the name of the class, you're hurting, you should do it this way

    SYM $(".) Preview"). Remove();

    and that's why you can not make it work

    If tehre is any question feel free to ask me questions

    Zaxist

  • How can I animate in sync with an audio file? Flash CS6

    I need to create an animation in flash which is placed in Captivate as a swf file. The animation should be in harmony with the slide audio in Captivate. I imported my audio file into Flash and placed on its own layer in my animation.

    Screen Shot 2013-05-15 at 9.04.26 AM.png

    When I press Enter to play my animated film, everything seems to work properly. the audio plays in sync with my animated film. However, when I press Enter to stop plackback, the playhead stops, but the audio continues to play and will not stop until I have close Flash. What is the proper way to animate in sync with an audio file? Or should I do this another way?

    Click on frame 1, layer 2.  in the properties panel, assign the stream sync property.  Repeat the test.

  • Is there a way to tag audio files on an ipod nano 8th generation and iphone?

    Hello

    I listen to audio long music mixes and podcasts radio, usually between 2 to 4 hours long. But many times, I want to set up. I would to halfway through listening to a mix of music for 2 hours, then to go to the podcast. But then I don't want to return to the mix of music later but at exactly at the same point in the mix where I left. Is it possible to bookmark this point in time in the mix?

    Whenever I go to another audio file, it's always a pain in the anus to then navigate to that point in time in the first file I listened. I went through all the menus and see no option for this. This type of bookmarking functionality is available?

    I use an iPod Nano 8 Gen and iPhone 5s and both are updated to the latest updates/IOS

    Thank you very much

    ElectroCA

    In iTunes, select some of your audio files for a long time, get information, and then on the Options on the tab playback position check store. Sync.

    TT2

  • Is there an event to find out when a reading of his judgment?

    I'm developing an ActionScript 3.0 for Playbook.

    I want to know when a sound has finished playing. All sounds are 1 second length.

    This is my code:

    import flash.media.Sound;
    
    ...
    
    private var yesSnd:Sound;
    private var noSnd:Sound;
    
    ...
    // Class constructor.
    yesSnd = new Sound();
    yesSnd.load(new URLRequest("assets/sounds/yes.wav"));
    
    noSnd = new Sound();
    noSnd.load(new URLRequest("assets/sounds/no.wav"));
    ...
    // Another method
    yesSnd.play();
    ...
    noSnd.play();
    

    By the way: can I play sounds on PlayBook?

    I'm agree with peter that even a simple search could have answered your questions I already had an example avalible. You must use the SoundChannel returned by the play() function to add.

    channel.addEventListener(Event.SOUND_COMPLETE, );
    
  • Is there an event when the mobile connections are changed

    Hi, expert,

    I'm looking for an auditor check the following:

    1. when the phone is connected to a mobile network not connected

    2. when the phone is connected to another mobile network (another carrier or wifi) from current network

    3. the current mobile network connection is dropped.

    I found of initailly than ConnectionAttemptLIstener (http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/io/transport/ConnectionAttempt...). I thought I could use it to change mobile network connection. It turns out that I just couldn't. He listens to the event on ConnectionFactory which really is a connection on the connected mobile network.

    Did some research and I could not find any related information.

    So is it possible for me to achieve what I said at the outset?

    You can use a combination of CoverageStatusListener and RadioStatusListener to have access to these events.

    CoverageStatusListener will let you know what type of network access you have access from your coverage (by cell phone connectivity, etc.) WLAN network and which network transports are available).

    RadioStatusListener will let you know when the changes on the cellular network occur as signal changes, changes the base station etc.

    RadioInfo class can also be used to receive information on the current mobile network too.

    Kind regards

  • How to associate the audio file with progress bar

    Hi all

    I have a case in which I need to associate an audio file with a progress bar. What I want to do is to able to read an audio file that will say "Started process..." "Continuous on" process ends and it is and must be synchronized with the progress bar. Is it possible to do so.

    Please let me know

    Thank you

    Ankit G

    Are you referring to a LabVIEW horizontal/vertical progress bar that basically an integer U8 constantly wrote in it? Is it in a loop as it fills?

    If so, there is a full range that allows you to listen to the signals. As you write the number of your progress at the helm, you can keep control of what the number is (structure of the event or case), and when it hits special values, you play special sounds. Here's a screenshot of this palette.

  • Why Windows Media Player in W7 duplicate audio files apparently without input from me

    It's pretty simple. I have a PC with i5 processor and run W7 home edition. For some reason, unbeknownst to me WMP duplicates now so ripped audio files from a CD. Sometimes it is incompatible with only about 90% of the titles in doubles and it doesn't happen immediately. After that the days of non-use, I open WMP to find a disc that I thought had apparently escaped, magically duplicate. Indeed strange events. I can't comment on downloads on the net that I do not use this source. Anyone can shed light on the issue?

    Rod Armstrong

    Hi Rod,

    1 are - that these duplicates reflect while ripping CDs with Windows Media Player?

    2 did you do changes on the computer before the show?

    First, check if there are different entries for the same media on your computer. If a song or a file is saved two times he can show you a duplicate because they are located in two different places.

    Method 1: I would recommend you to rebuild the database of Windows Media Player and see if the problem is resolved.

    Here's how:

    To resolve this problem, delete the Windows Media Player database. To do this, follow these steps:

    a. exit Windows Media Player.

    b. click Start, click run, type %LOCALAPPDATA%\Microsoft\Media Playerand then click OK.

    c. Select all files in the folder, and then click delete on the file menu.

    Note: You don't have to remove the folders that are in this folder.

    d. restart Windows Media Player.

    Note: Windows Media Player automatically rebuilds the database.

    Method 2: If this does not resolve the problem, disable the Windows Media Player database cache files.

    To do this, follow these steps:

    a. exit Windows Media Player.

    b. click Start, click run, type %LOCALAPPDATA%\Microsoftand then click OK.

    c. Select the Media Player folder, and then click delete on the file menu.

    d. restart Windows Media Player.

    Hope this information helps. For any other corresponding Windows help, do not hesitate to contact us and we will be happy to help you.

  • Why my audio file seems different in CC Flash when you preview in SWF?

    When I listen to the audio file after import into the flash library, it seems normal, but when I saw it in SWF, it sounds rather distorted. Is there a reason why?

    Check your audio settings by click on file > publishing settings and click on the links following the flow or event.

Maybe you are looking for