Flex MP3 Player

Just finished writing this tutorial.
http://www.vipercreations.com/tutorials/Adobe%20Flex/29.html
Teaches you how to create an entire mp3 player in Flex.
Comments?

Sorry for the necromancy, but I've seen this come up a few
other places as well. I wanted to offer up my solution for anyone
who wants to use it. Better still if anyone can point out any
mistakes I made or even possibly tell me how to make a component
out of it.
Obviously it's still ugly as sin, but it does include a
progress/scrub bar.
Files:
just
mxml or
mxml and
mp3

Similar Messages

  • Mp3 player problems on mac os

    Hi!
    I'm newbie in flex and I have a problem when I run flex mp3
    player on mac OS. Here is the site where I get the player.
    http://labs.flexcoders.nl/2007/02/21/easy-to-use-mp3player-version-003/.
    There are no problems in windows OS. The problem in mac is it you
    will need to click stop button first and after that click now the
    play button. But in windows you will only click the play button. Is
    there something wrong in the code? Or I will need to install
    plugins for MAC.
    Please help me.
    Thanks in advance,
    Ridge.
    anyway here are the codes:
    Mp3Sample.mxml:

    Try assigning an initial value to the pausePosition variable
    in MP3Player.as, probably in the constructor:
    public function MP3Player():void{
    this.pausePosition = 0; //assign the value of 0 here
    this.explicitHeight = 0;
    this.soundInstance = new Sound();
    this.soundTransform = new SoundTransform();
    this.setupListeners();
    TS

  • Flex 4.6 mobile mp3 player....create progressBar

    how to create progressBar for mp3 player in flex 4.6 mobile???
    help me please!!!!

    consider this scenario:
    1. user click a button and advances to the next view.
    2. here clicks a textinput so it focuses and soft keyboard appears
    3. user click back key on his phone - soft keyboard retracts (no backkeypressed event caught)
    4. textinput still has the focus border around it (why?) and user clicks back key again - application goes in the background for a couple of seconds and closes itself.
    I attached the .fxp for the test project
    http://dl.dropbox.com/u/4318878/TestBackKey.fxp

  • MP3 Player - Is it realistic with Flex???

    Hi every Flex fans and Flex experts,
    After a week of fluctuation from happy to angry, I conclude
    that there is not a lot of resource to build a nice-and-easy MP3
    player in a Flex application. Yes and no! I mean, there is some
    basic solutions, such as the idea from Viper Creation (
    http://www.vipercreations.com/tutorials/Adobe%20Flex/29.html).
    But when you look at all those SWF available from Flashkit.com or
    whatever the web site is - in case of independant flash developer -
    it seems that there is a lack concerning parameters when it is time
    to use the SWF at the full advantage. What I mean by that is most
    of those super Flashy MP3 Player - working with a playlist in XML -
    are passing a lot of parameters to setup the style of the player.
    In Flex, we can use the component SWFLoader and indicate the Source
    but when you try to play to much with the parameters (everything
    after the "?" and split with "&"), the system does not like it
    and you cannot compile!
    I been looking and looking since there is not a lot of
    documentation at this time to try to find a way to play with
    parameters but without a lot of succes.
    If anybody have hint to help me, please do not hesitate.
    Thank youm

    Any music and videos purchased on iTunes will not work on any other player other than iPods and iPhones as well as your computer. Sony MP3 players will not play music and videos purchased in iTunes because of the digital rights management included in every purchase.
    You can burn the music to disc. Have a great day.

  • Flex xml mp3 player

    How to make an mp3 player with xml playlist. just like
    streaming player with volume control and autoplay. Thanks and more
    power.

    are you trying to use your xml data before loading is
    complete? is there a security issue? does your player work if you
    hardcode one of the mp3s?

  • MP3 Player, XML, Cover and Link

    Hi,
    i wonder if i can easily creat an MP3 player for my website
    with flex. I need a simple player that shows the cover, band and
    title of the song that is played. the player should start by random
    if the user enters the site. the user is able to skip forward and
    backward and to stop playing. all data comes from an XML file.
    i want the view of the player to be changed if i want to.
    size, color.
    is this easy to do with flex?
    cheers
    denis

    Hi,
    Yes, it is. Please find a sample at the URL below. You will
    find a sample application called Podcast Player. You will find more
    samples.
    http://www.adobe.com/go/as3examples
    Hope this helps.

  • How to calculate current time in mp3 player.

    Hello friends
                       i am developing a small mp3 player in flex3.it is working fine but i need to find current time for its slider movement.i already calculated th length of song .but could not calculate the current time so that i can move pthumb of slider for my song.
    i know its very simple but i m not getting any clue. so please help me out.
    Thanks and regards
       vineet osho

    mathsssss
    http://www.mattlefevre.com/viewExample.php?tut=flex&proj=Basic%20MP3%20Player

  • MP3 Player Play/Pause?

    I'm making an MP3 player.  I can't get the play/pause toggle to work.  I'm not sure how to have the event be toggled on and off. Sorry, I'm a newbie to flex.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:net="flash.net.*" xmlns:media="flash.media.*" creationComplete="mySound.load(myURLReq)" themeColor="#000000" borderColor="#000000" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]">
        <mx:Script>
            <![CDATA[
                private function appInit():void {
                    stage.addEventListener( KeyboardEvent.KEY_DOWN, keyPressHandler );
                private function keyPressHandler( e:KeyboardEvent ):void {
                    // if the spaceBar is pressed then toggle play/pause
                    if( e.charCode == 32 ) {
                        if( this.focusManager.getFocus() != toggleBtn ) {
                            this.focusManager.setFocus( toggleBtn );
                            // whatever happens when you click on the button you place here
                            // it's best to have a 'clickHandler' that calls another method
                            toggleBtnHandler();
                private function clickHandler( e:Event ):void {
                    toggleBtnHandler();
                private function toggleBtnHandler():void {
                    if( toggleBtn.label == "PLAY" ) {
                        toggleBtn.label = "PAUSE";
                    } else {
                        toggleBtn.label = "PLAY";
            ]]>
        </mx:Script>
    <mx:Button id="toggleBtn"
            x="10" y="70" toolTip="Press the spacebar to toggle label"
            click="clickHandler( event );"
            label="PLAY"/>
       <mx:Number id="myPos">0</mx:Number>
       <net:URLRequest id="myURLReq" url="01-amy_macdonald-dont_tell_me_that_its_over.mp3" />
       <media:SoundChannel id="mySoundChannel" />
       <media:Sound id="mySound" />
       <mx:Panel title="MP3 Player">
         <mx:Text id="prog" />
         <mx:ControlBar>
           <mx:Button id="play" label="PLAY" click="mySoundChannel = mySound.play(myPos, 0, null);" />
           <mx:Button id="pause" label="PAUSE" click="myPos = mySoundChannel.position; mySoundChannel.stop();" />
           <mx:Button id="stop" label="STOP" click="mySoundChannel.stop();" />
         </mx:ControlBar>
       </mx:Panel>
    </mx:Application>

    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1248142&highlight_key=y&keyword1=mp3
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1249411&highlight_key=y&keyword1=mp3
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1247499&highlight_key=y&keyword1=audio

  • Need simple mp3 player

    I need either a flex or flash mp3 player that uses an xml
    playlist and runs on FMS3. Our new FMS server is working great and
    we've been successful at installing samples that came with the
    server as well as the tutorials in the Adobe developer's site. The
    thing is... I'm a CF developer and while I can navigate flex and
    flash (have downloaded trials for both now) I am unable at this
    point to write an application.
    Can anyone direct me to a product (free or for sale) that
    gives me a nice small skinable mp3 player with just
    play/stop/pause/volume controls and allows the user to select a
    file from an xml playlist. I'd like source files so I can modify
    but that's not necessary as long as the product is configurable. I
    can find no such creature via google search. TIA!

    How are you trying to transfer the files? Are these definitely MP3 files and what are the specifications of the files?

  • I just purchased to songs to put on my child's Leappad 2 MP3 player and I can see the songs under my music files but cannot save them because they were not downloaded as a MP3 file What can I do?

    I just purchased two songs to put on my child's Leappad 2 MP3 player and I can see the songs under my music files but cannot save them because they were not downloaded as a MP3 file What can I do?

    iTunes: How to convert a song to a different file format

  • What if you tried doing the clean up on your mp3 player and it don't work in rescue m

    i tried doing a clean up cause my mp3 player is in rescue mode and it don't do anything. i've never formatted anything in my life so i'm a little nervous about doing that. is there some keys you hold to get the clean up to work. i have a zen xtra mp3 player. it is my husbands. so if anyone can help me out there please e-mail me at [email protected] and put in the subject line rescue mode help. tracy

    and how do i do that i've never done that before?tracy

  • How can I fix 2121 sandbox security error, local swf MP3 player test calls MP3's from website?

    1st Issue.  I am a new user and am fighting #2121, #2044 & #2048 Flash security errors in getting an MP3 player to work as I test the fla file in Flash CS4 on my local computer.  The fla in Flash and swf in Dreamweaver calls mp3 files from our host server on the internet.
    After reading various sparce posts and Adobe articles on this issue, I have added a crossdomain.xml file at our websites root (see file below) and added the code, flash.system.Security.allowDomain in line 1 of the action script of the flash fla to allow our site access (-see script below).  These efforts have helped get the player to work better on our test site.
    But, I am still getting the 2121 error within Flash CS4 as I debug the player or play the swf in live view within Dreamweaver.  Playing the fla or swf will lock-up the Flash 10 player and crash the program. I am having the mp3 player access the mp3 files from our web site as I test the fla.
    Here is the debug message I am getting:
    Attemping to launch and connect to Player using URL C:\Web Site Files\Plank Productions afc\Plank Productions 2010\site\MP3_List_Player_AS3.swf [SWF] C:\Web Site Files\Plank Productions afc\Plank Productions 2010\site\MP3_List_Player_AS3.swf - 209827 bytes after decompression SecurityError: Error #2121: Security sandbox violation: Sound.id3: file:///C/Web%20Site%20Files/Plank%20Productions%20afc/Plank%20Productions%202010/site/MP3%5FList %5FPlayer%5FAS3.swf cannot access . This may be worked around by calling Security.allowDomain.
    at flash.media::Sound/get id3()
    at com.afcomponents.mp3player::MP3Player/get id3()
    at com.afcomponents.mp3player::MP3Player/handleBuffe ring()
    Here is the crossdomain xml code:
    <?xml version="1.0" encoding="utf-8"?>
    <?xml version="1.0"?><!DOCTYPE cross-domain-policySYSTEM "http://www.macromedia.com/xml/dtds/cross-domain- policy.dtd">
    <cross-domain-policy>
    <allow-access-from domain="www.plankproductions.com" secure="false"/>
    <allow-access-from domain="plankproductions.com" secure="false"/>
    </cross-domain-policy>
    Here is the AS3 in line 1 of the Fla file that I added:
    flash.system.Security.allowDomain("www.plankproductions.com", "plankproductions.com");
    2nd Issue.  The online playback of the mp3 player will play about 4-7 mp3’s then lock-up in Internet Explorer 8 on a pc.  I think that is related to flash security, not sure, I do not know how to debug the mp3 player on the web site.
    http://plankproductions.com/pptemplate_afc_mp3.shtml
    Questions.
    -How can I resolve the error 2121?
    -What as3 code do I need to target the local c drive to have security clearance and work properly, is this the problem?
    -Why is the mp3 player locking up on the web page?
    Thank you in advance for any help.
    Operating System: Windows XP Professional, CS4 Web Premium

    Do you have the standard or debug player installed?  Such errors should not occur with the standard player.
    See http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html#main_Find_Flash_Play er_version_type_and_capabilities__Flash_developers_only_

  • I have copied my CDs into iTunes  (currently running v11) to play on my iPod.  I have now bought a non Apple mp3 player to use when I am out running.  How can I copy the many tracks I want from iTunes onto the new player?

    I have copied my CDs into iTunes  (currently running v11) to play on my iPod.  I have now bought a non Apple mp3 player to use when I am out running.  How can I copy the many tracks I want from iTunes onto the new player?
    Thanks

    I tried Notpod but can't get it to work.  Part of the problem, I suspect, is that I can't create a folder on my player (a SanDisk Clip+).  I also can't do this in Windows Explorer.  Whilst I can see the Clip+ in Explorer, the option to create a new folder isn't there.
    The error mesag I get in Notpod is:
    "Unhandled exception has occurred in your application.  If you click Continue, the application will ignore this error and attempt to continue.  If you click Quit the application will close immediately.
    InvalidArgument=Value of '0' is not valid for 'SelctedIndex'. Parameter name: SelectedIndex"
    Then, when I plug the Clip+ into a USB port, iTunes thinks it is my iPad - which is because, I guess, Notpod hasn't worked.
    I can drag and drop files from the Music folder where my iTunes tracks are stored onto the Clip+ and they get converted but I'd rather synchronise a Playlist from iTunes if I can.
    Thanks anyone who can help

  • How can I copy my iTunes library over to my MP3 player?

    I have all of my songs saved in my iTunes library and on my iPad.  How am I able to get this transferred over to my Sony MP3 player?

    Read the diresctions for your mp3 player.

  • I have an mp3 player and want to use itunes

    I have a scan disc mp3 player and would like to transfer music from itunes to put in it. thanks greg

    iTunes only supports iPods, iPads and iPhones.

Maybe you are looking for