13 Replies Latest reply on May 25, 2012 9:35 AM by sinious

    Sound isn't working?


      I'm trying to make a button have sound when you hover over it, but it isn't working and I don't know why.

      I put the sound file above the "Over" frame where I want it to play.

      Pic 1.png

      When I click the play button at the bottom of the timeline, the sound works fine but when I go to test the movie the sound never shows up. I thought I might have accidentally cut off the sound or something, so I extended it in the timeline:

      pic 2.png

      but that didn't work either. I have no idea what I'm doing wrong and I'm getting frustrated. The actions that I put in the "Over" frame work fine, but the sound doesnt.

        • 1. Re: Sound isn't working?
          sinious Ninja

          Open your properties panel. Go inside the button and click inside the frame that has the audio. Look at the Sync drop-down. Make sure it's set to event and not Stream. Stream will only play (in this situation) 1 frame of audio. Event will play all the audio.


          Event is selected by default so I presume it is selected now but make sure because that would definitely cause the problem and we'll go from there.

          • 2. Re: Sound isn't working?
            s3l3n4~ Newcomer

            Yes, it has been set to event

            • 3. Re: Sound isn't working?
              esdebon Champion

              maybe you should edit the sound, I see that has a long silence at the beginning

              • 4. Re: Sound isn't working?
                s3l3n4~ Newcomer

                Just tried that, didn't work though.

                • 5. Re: Sound isn't working?
                  sinious Ninja

                  Even if it has a long silence in the beginning it will eventually play as long as Event is selected.


                  From what I see above the silence isn't even a second long (depending on framerate) so you would still hear it.


                  Are you using any special compression settings in publish settings or any custom compression settings on the imported audios properties in the library?

                  • 6. Re: Sound isn't working?
                    s3l3n4~ Newcomer

                    No, I don't think so. As far as I know, everything is still on the default setting.

                    • 7. Re: Sound isn't working?
                      esdebon Champion

                      hehehe, maybe is the volume

                      • 8. Re: Sound isn't working?
                        sinious Ninja

                        The last person that said sound wasn't working in a video had their ipad muted.. I wouldn't write it off

                        • 9. Re: Sound isn't working?
                          s3l3n4~ Newcomer

                          I know I have the sound on my laptop turned on, is it possible I could've accidentally changed something so that when I preview it I can't hear sound?

                          • 10. Re: Sound isn't working?
                            sinious Ninja

                            No such option. You mentioned you can hti the play button and hear audio so I assumed your audio was on anyhow.


                            Can you try to isolate this? It's so basic it's hard to say what it could be.


                            Make a new flash doc. Draw one temporary button. Import that audio clip and place it on the timeline in the mouse over frame. Test it.


                            If that doesn't work, try another audio file.


                            Make sure your publish settings are set appropriately on audio (defaults to 16khz, yuck).

                            1 person found this helpful
                            • 11. Re: Sound isn't working?
                              s3l3n4~ Newcomer

                              It did work when I made a new file and a simple button.

                              I don't understand why it wouldn't work on the file that has all my work on it though? D:

                              • 12. Re: Sound isn't working?
                                esdebon Champion

                                Sometimes is the codec, you can try to change the format in an external program

                                • 13. Re: Sound isn't working?
                                  sinious Ninja

                                  I was banking on an audio file corruption and you wouldn't hear any audio. At this point can you save your work into a new separate file (just for testing), remove the audio file and re-import it. Then add it back to the button.


                                  My only question on this all is you're using the timeline rather than code so I tend not to suspect code is preventing the default action. Your button DOES show a rollover state correct? You just don't hear audio?


                                  If it wasn't on the timeline it would make me think some code is running the preventDefault() method to stop the event from triggering the button. That or perhaps some code has set the buttons .enabled or .mouseEnabled to false. Or there is text in the button that you haven't disabled the ability to be selected. Text that can be selected can interfere with a buttons rollover so make sure text in or above that button isn't selectable (properties panel to deselect that option or set the .selectable property to false).


                                  Lastly just for debugging perhaps you can set a listener for MOUSE_OVER and make sure it's being fired.


                                  e.g. if the buttons name is myBtn:


                                  myBtn.addEventListener(MouseEvent.MOUSE_OVER, function(e:MouseEvent):void { trace("Mouse Over!"); }, false, 0, true);


                                  Then when you roll over the button you should see "Mouse Over!" in your trace window.