Skip navigation
s3l3n4~
Currently Being Moderated

Sound isn't working?

May 25, 2012 8:03 AM

Tags: #cs5 #help #flash #buttons #sound #stuck

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.

 
Replies
  • Currently Being Moderated
    May 25, 2012 8:07 AM   in reply to s3l3n4~

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2012 8:12 AM   in reply to s3l3n4~

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

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2012 8:17 AM   in reply to esdebon

    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?

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2012 8:40 AM   in reply to s3l3n4~

    hehehe, maybe is the volume

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2012 8:50 AM   in reply to esdebon

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

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2012 9:04 AM   in reply to s3l3n4~

    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).

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2012 9:28 AM   in reply to s3l3n4~

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

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2012 9:35 AM   in reply to s3l3n4~

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points