Jump to content
Search Community

Accessing the Sound SampleDataEvent

Sam test
Moderator Tag

Recommended Posts

I am trying to access the SampleDataEvent for a sound that has been loaded by the MP3Loader. I had assumed that this would be as easy as adding an event listener to the content of the loader like so:


( ( _loader as MP3Loader ).content as Sound ).addEventListener( SampleDataEvent.SAMPLE_DATA, onSampleData );

... but I am not seeing any events.

 

Help Please

Link to comment
Share on other sites

For the record there is audio. It is loaded properly and a play call results in sound issuing forth from my speakers. I am even able to do an extract on that same content and manipulate the resulting byteArray. I am just not getting the SampleDataEvents.

Link to comment
Share on other sites

Frankly, I don't have experience using SampleDataEvents, but Adobe's docs seem to indicate that they don't get dispatched unless you have NOT loaded any MP3 into the Sound instance. So if you're using it with MP3Loader, I assume you've loaded an MP3, thus it would be expected that you're not getting those events dispatched.

 

Adobe's docs: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/SampleDataEvent.html

 

Also, just checking:

  1. Are you publishing to Flash Player 10 or later?
  2. Are you using the latest version of LoaderMax/MP3Loader?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...