MXML component for playing sound (MP3)

May 22, 2006 12:53


If I had a dollar for every time somebody asked me why Flex 2.0 doesn't have an MP3 player component, er, .... So anyway, I wrote one last night.

Source: SoundPlayer.as
Features... )

flex, hacks

Leave a comment

Comments 6

thnx anonymous May 22 2006, 18:29:32 UTC
Sweet, thank you!

Reply

not working anonymous June 16 2006, 09:39:13 UTC
hey manish i tried compiling your code but it is not working...The swf file is of only 2 KB...please help

Reply

Re: not working mannu June 16 2006, 09:54:39 UTC
I guess you're compiling SoundPlayer.as by itself. SoundPlayer is a component, not an application. To see it working, you'll have to write a small test application, like so:

Reply


Changing source anonymous September 22 2006, 00:59:09 UTC
Manish,

This is a great component. I got everything working except I cannot programatically change the source for the soundplayer at soundComplete event. Any help will be appreciated.

Thanks
Venkat

Reply

Re: Changing source anonymous October 7 2006, 22:13:56 UTC
I had the same problem, and I found a fix. In the bounceEvent method, I moved the call to dispatchEvent to after the call to the stop method. That way it stops the sound when it reaches the end, and then calls the soundComplete event instead of dispatching the event and stoping right after you just loaded a new sound.

Dan

Reply


carlogulliani May 6 2007, 13:28:37 UTC
Excuse me for my English, Whether can this component show ID3 Tags? Also maybe do you know how to display cover artwork mp3 file?

Reply


Leave a comment

Up