Comments

82 Responses to “ActionScript 3 XML MP3 Player”

  1. Tyrone Neill on February 21st, 2008 2:13 pm

    Its very cool and Im sure Im going to enjoy tearing it apart and seeing how it works, thanks mate

  2. Lushen on February 24th, 2008 5:14 pm

    spektacufuckingfabulous :P

  3. Haungo on February 25th, 2008 9:03 pm

    Thanks Man! I’m going to put this to some good use. I’ll show you when I’m done. :]

  4. Stephanie on February 26th, 2008 10:24 am

    heey,

    I tried to use ur code, and my own design, so I renamed all the buttons and movieclips in my design, as ur design, but i keep getting

    TypeError: Error #1010: A term is undefined and has no properties.
    at Mp3Player()

    I did remove the spectrum, but that shouldn’t be a problem…

    can u help me?

  5. Jared on February 28th, 2008 6:53 pm

    It’s hard to pinpoint the problem just like that. It’s most likely that somewhere in your modification you must have deleted a variable or something. It’s best if you could make your file downloadable (here or in a help forum) so maybe others can help out as well.

  6. Keith on March 21st, 2008 7:38 pm

    Thanks for this. I’ve been dissecting code trying to find a good way to make a mp3 player and this is awesome. However I’m still a newb to as3 and for some reason when I press pause and then play, the sound starts a few seconds earlier then when I paused it. Could this be because my .fla assets, like the tbar, etc. are different sizes? And I haven’t even touched the buffering code, yet for some reason my player loads the whole mp3 before it even plays. Any ideas, explanations, suggestions would be greatly appreciated. Thanks again!

  7. Ryan on March 25th, 2008 10:02 am

    This is exactly what i’ve been trying to find. Only one question… is there any way to import this into another .fla? Such as if i’m making a game and wanna use this in it. I tried importing the .swf but that doesn’t work and if i try converting this into an mc that doesnt work either. is there any way to do it?

  8. b333 on April 1st, 2008 1:57 am

    wow, thanks! i’ve already downloaded it and really excited about modifying it. it’s my first time using as3.0 and now i’ve got a brighter view about using it.

  9. bikos on April 3rd, 2008 4:51 am

    Best Online mp3 player I have ever saw!! kudos my coding friend

  10. nikos on April 3rd, 2008 4:54 am

    Sorry my name is Nikos, not Bikos :)

    Anyway I like how the button events don’t clash and the slider doesn’t run off the screen, like one I was using and coding with before.!!

    Impressed really!

  11. Jared on April 3rd, 2008 4:15 pm

    Thanks guys, for all the comments. I wish I could answer your issues but I’m quite bogged down with work at the moment. The code is all provided, sometimes you just need a day or two before you get whats going on. Don’t give up.

  12. I-one on April 15th, 2008 10:56 pm

    Hi… It would be great if u could actually see the playlist and scroll for the song u want…. else it is a beauty pf a player

  13. kaylee on May 3rd, 2008 7:12 pm

    this is a great player! i re-skinned to use. one thing, though, i can’t get the ID3 tag to work… it’s still saying “buffering”… it doesn’t even say that show the proper txtDisplay. help!

  14. Nikos on May 5th, 2008 6:43 am

    Anyone know how you change the default behavior so that the music doesn’t begin playing automatically?

  15. jared on May 5th, 2008 7:10 am

    I believe line 184 says “// Starts playing on run” so I suppose if you commented away the block of code that follows, it won’t play on run. :)

  16. jared on May 5th, 2008 7:11 am

    kaylee: the player you downloaded reads the id3 tag off perfectly. You must have accidentally deleted away something.

  17. Nikos on May 5th, 2008 8:22 am

    I believe line 184 says “// Starts playing on run” so I suppose if you commented away the block of code that follows, it won’t play on run. :)

    nah all that does if I comment out the following ocde is throw me errors if I later click on play:(

    isLoading = true;
    timer.addEventListener(TimerEvent.TIMER, onTimer);
    timer.start();
    currentTrack = 5*Math.random();
    loadTrack(currentTrack,0);
    isPlaying = true;

  18. jared on May 5th, 2008 5:01 pm

    It won’t work because you have now got to set up the play button to process the stuff you commented away. I’ll post an example when I can.

  19. Ottis on May 16th, 2008 10:14 am

    This is what my modified xml-code looks like:

    ljudet.mp3

    Boomski_derek_k_short.mp3

    The fla/swf loading it plays both songs as planned, BUT even though ljudet.mp3 does have id3-tags they won´t show. “Unknown Artist – Unknown Title” is the only thing I get. Boomski_derek_k_short.mp3 doesn´t have id3-tags and all I get is “Buffering..” while it is playing.
    I have obviously missed something, but what and how do I fix the problem?

  20. Ottis on May 16th, 2008 10:18 am

    Guess I have the leave out the tags… Here´s the xml-code again (without tags):

    mp3player
    mp3 id=”1″
    url ljudet.mp3 url
    mp3
    mp3 id=”2″
    url Boomski_derek_k_short.mp3 url
    mp3
    mp3player

  21. jared on May 16th, 2008 4:50 pm

    I have no idea. The demo here I put up is running off id3 tags, it should all work, unless of course the mp3’s dont have id3 tags.

  22. Claudia on May 18th, 2008 5:01 pm

    I have the same problem that Nikos: how make the music doesn’t begin playing automatically?

    Thanks for the excellent player!!

  23. Lin on May 18th, 2008 7:36 pm

    Jared,

    Great Mp3 player. Have you come around to commenting away line 184, and setting up the play btn, so as it will not autoload.

    Regards,

    Lin

  24. elultimogamer on May 21st, 2008 11:43 am

    thanks!
    gracias!

  25. Quince on May 26th, 2008 10:07 pm

    To answer all those questions about making the player not play at the start.

    Here is the fix:
    in Mp3Player.as
    add a private var (I added it to line 55) like this.

    private var playerInt:Boolean = false;

    Now go to line 181
    private function onLoaded(event:Event):void {

    }
    delete everything inside this function.

    Finally go to line 232 and change the togglePlay function to this.
    private function togglePlay(evt:Event):void {
    if(playerInt == false){
    data = XML(urlLoader.data);
    parseData(data);

    // Starts playing on run
    isLoading = true;
    timer.addEventListener(TimerEvent.TIMER, onTimer);
    timer.start();
    currentTrack = 0;
    loadTrack(currentTrack,0);
    isPlaying = true;

    playerInt = true;
    }else{
    // If playing, stop and save that position
    if (isPlaying == true) {
    _channel.stop();
    isPlaying = false;
    _currentPosition = _position;
    } else {
    // Else, start at the saved position
    _channel = _sound.play(_currentPosition);
    isPlaying = true;
    }
    }
    }

    on this I should note is that by bypassing the onload function you aren’t garauntied that the xml file will have loaded before you click play.

    and easy fix for this is to initiate the play buttons event listener in the onload function.

    to do this you will copy then comment out line 71 (i.e. shown below)
    playPauseButton.addEventListener(MouseEvent.CLICK, togglePlay);

    then paste in at line 182 as shown below.
    private function onLoaded(event:Event):void {
    playPauseButton.addEventListener(MouseEvent.CLICK, togglePlay);
    }

    Hope this helps!

    Quince

  26. Quince on May 26th, 2008 10:25 pm

    One other thing I should mention is that in the onload function you should add some ready states for the player.

    txtDisplay.text = “Press play to start player”;
    tBar.tBarLoad.width = 0;

    so forth and so on…

  27. Claudia on May 27th, 2008 5:24 pm

    Jared and Lin,
    I’m learning this codes, so i didn’t understand what’s the meaning of “setting up the play btn” ??

    Thanks for the help!! =)

  28. Lin on May 27th, 2008 6:22 pm

    Hi Claudia ,

    This is in ref. to your question- Jared here had mentioned that (if you look back to Bikos’s, pardon me Nikos’s question)- about not having the autoload feature- but having load at command. Jared’s last post said that he would have to set up the play feature on his actionscript , to make it work – because commenting away the lines after //Play to run- gives errors. I hope Jared has solution for all of us- nice mp3 player-he sounds like a busy guy.

    Regards,

    Lin

  29. Quince on May 28th, 2008 8:49 am

    Lin? I just posted the fix for Biko’s above…

  30. jared on June 6th, 2008 7:36 am

    Big thanks, Quince for your help.

  31. Dondi.biz on June 7th, 2008 8:11 am

    This is hot!!! Your demo was cool too. I think I listened to every song. They key to this whole application is having some good music so people stick around long enough to here the tracks.

    Ps.. That mix you got on there is sick.

    and you saved me a bunch of time getting ready to develop my own player.

  32. Ryoma on June 7th, 2008 9:15 am

    Hi all,

    Can anyone send/updated the final so call after all the comment/queries on this player on here.

    I am beginner here and very blur/confused after reading all the post here.

    Actually i have downloaded the player too but cant’ work, i change the background picture only.
    it show error :-

    Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
    at Mp3Player/loadTrack()
    at Mp3Player/::onLoaded()
    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()

    Could any of you(EXPERT) here please guide me. How should i modified the .AS file & the .XML file and i intended to load the mp3 songs from the web where can i find the links & how to code it in..

    Appreciate to all of you who’s help me on this,
    THANKS :)

    Regards,
    Ryoma
    mstar3145@gmail.com

  33. jared on June 7th, 2008 11:20 pm

    ryoma – you’re having the error because the app can’t find your mp3 files. what you need to do is make sure your xml file points to where your mp3 is, be it on the web (url) or your hard disk (same folder).

    dondi – i deleted some of your comments because i didnt want people to be misled by your suggestion which doesn’t work. the application works fine by itself, thanks for your input though. am still looking forward to your sliding playlist add-on.

  34. jared on June 7th, 2008 11:46 pm

    Here’s a quick fix if you don’t want the mp3’s to play when it starts. All you need is put these two lines at the end of the onLoaded function

    addEventListener(“dontPlay”, stopTrack);
    dispatchEvent(new Event(“dontPlay”));

    Now when everything is loaded, it dispatches the stopTrack function, which is called when the stop button is pressed.

    Essentially just an automation of hitting of the stop button after it loads.

    Get the .as file here.

    Cheers

  35. Doug on June 12th, 2008 1:51 pm

    Awesome media player, thanks a ton for sharing it w/ the world!

    I’m having one problem implementing on my site. I’m trying to pull mp3’s across domains. I have the mp3.swf on one domain, and then the playlist.xml and mp3 files on another. I modified playlist.xml to have absolute links to the mp3 files and modified Mp3Player.as to absolute link to the playlist.xml file. In firefox, everything is working great. But in IE and Safari, the music plays, but the display stays at Buffering.. 0:00 and the spectrum does nothing. Any clue what could be going on here? Is everything relative to the page loading the flash file, or the flash file itself?

    Just for a note to others running into problems with the ID3 tags. Make sure you’re using v2.3 or later on them. If you use iTunes, it’s simple to change between versions. Just right click on the file and select ‘Convert ID3 Tags..’ and select v2.3 in the drop down. I was using a few mp3s that were 2.2 and was not working. After changing to 2.3 this MP3 player read them just fine.

  36. Doug on June 12th, 2008 3:31 pm

    sorry to double post. I’ve made some changes and am now just trying to run everything like you have it set up. I’ve undone all my changes apart from the relative url to mp3 files in playlist.xml and put on my web space. I’m still getting the same problem as i described above. Works great locally and in firefox. spectrum and Buffering.. 0:00 don’t work in IE or Safari. I’m using swfobject to embed the flash. Could it be related to that? Here’s the link to the files:
    http://connect2.askadmissions.net/connect2images/abdn/Mp3Player/mp3.html

  37. quince on June 12th, 2008 3:46 pm

    Your having sandbox issues since you are calling files that don’t existist on your server. Go to your publish settings. Then go to the flash tab. At the bottom you will see local asscess only change it to network… If that doesn’t work look into xml sandbox security issues and fixes.

    Hope this helps!
    Quince

  38. JadenUK on June 26th, 2008 7:32 am

    Firstly, superb player and very easy use.

    I’m just wondering if its possible to add an artist thumbnail each time a track changes and adding a playlist allowing you to choose the tracks in the playlist.xml file? Is this difficult to do and if so could you possibly show us?

    Thanks!

  39. Quince on June 26th, 2008 8:51 am

    Don’t you think this is where you should take a look at the code. Look how the xml is brought in and used then add one tag to the xml and pull that xml tags infomation for the image and image location. One thing you will need is to find a class that loads external images. Wow, the code for that is even on this site in the slideshow example. Take a look at that example and incorperate parts of it into your player. Breaking stuff is GOOD, fixing it is great. Just think you may even learn something about AS3 in the process. Don’t forget to show off your completed code when done to help others that want to do the same thing. ;~)

    Thanks!
    Quince

  40. JadenUK on June 26th, 2008 9:49 am

    Well cheers for that Quince – perhaps I forgot to mention that I’m new to actionscript. I’ll take a look at that code for the slideshow example. Any ideas on the playlist section?

    Thanks again!

  41. Quince on June 26th, 2008 10:55 am

    Don’t get me wrong everyone starts with zero knowledge. The only way to really learn Flash is to mess up, hit your head on the floor, think like a computer(Don’t think just do what your told computer). Finally at some point it will just click. The code examples you can find all over will show you how someone else made something close to your idea work. The great thing about class structure is you can use different classes together.

    I’ll point ya in the right direction.
    If you look at the featured links you will see one for a slideshow. go there and download that code. Now take a look at it, you will see it does everything you want the players thumbnails to do and then some… open the xml file that goes with it. You see the way images are listed?

    Now go back to your player code and open the xml file. see the same simple type of pattern? you can always add an iage attribute to the player that calls the image location.

    Now to the part that gets hard for beginers. look at there the xml is being called in on the players .as file. add an attribute just like you see it done in the class and just below where the song attribute is retrieved. now you have the info you need so you can call to the slide show class from within the player class. remeber to copy and paste the slide show class into the same folder as the player class.

    Now to finish it all up you will add the slide movie clips to the player libray and add some the slide show code to either the player fla acion layer.

    I hope this helps.

    When you get it working you wll no longer be a noob :)

    THanks!
    Quince

  42. Jaden on June 27th, 2008 12:17 am

    Lol, thanks for that Quince will give it a try and let you know how it went ;-)

    Speak soon…

  43. Summey on July 2nd, 2008 6:28 pm

    how do you change the color of the spectrum to pink?

  44. ba7baba7 on July 4th, 2008 6:22 pm

    Hey Summey! What shade of Pink do you want? Happy 4th of July to you Yanks! Change the tField.backgroundColor = 0xFF99CC
    This should give you some kind of pink to start off with.

  45. ba7baba7 on July 4th, 2008 6:24 pm

    Sorry, ..I meant just the color to 0xFF99CC.

  46. poqeteer on July 8th, 2008 2:38 pm

    My complements on the music… Oh and nice widget also!

  47. drake282 on July 11th, 2008 4:48 pm

    hi i’m kinda new to flash on a whole, i’ve managed to skin this player to match it to the design of my site the problem is now what is the best way to import this into an existing flash site?
    any help would be much appreciated.
    Oh yeah i really do love this player.
    thanx
    282

  48. drake282 on July 13th, 2008 4:19 pm

    its cool i got it to work inside a movie clip, dont mean to sound greedy but wat i would also like is how to show what tracks are playing.

    that would be nice.
    thanx again.

  49. drake282 on July 13th, 2008 5:01 pm

    its ok i know wat i’ve done sorry i’m just tired…lol

  50. drake282 on July 13th, 2008 5:23 pm

    ok again, even straight out the box the ID3 doesnt work.

  51. guillermo on July 17th, 2008 1:17 pm

    hello there, pretty cool mp3 player.

    quick question, how can you set titles and subtitles and also images from the xml files?

    i know you are using id3 which reference the song, but can you set it from the xml instead?

    i hope that makes sense.

    thanks.

  52. turiin on July 17th, 2008 2:42 pm

    hello, need a some help. i’ve embedded the swf file onto my site (local machine) but the player stays at “Buffering…”. when i test in the flash application “Ctrl+Enter” it works fine. Publishing (“Shift+F12″) works fine too. however, it does not work by embedding and i tried to create a simple text link to the published html file (launched in another tab/window) and i get the same problem. any idea how i can get this to work?

    thanks much for your help.

  53. Lin on July 22nd, 2008 8:04 pm

    Hi Jared,

    Thanks, I have gone as far as I can go with this- I have enjoyed it thoroughly for 3 months .

    I have been trying to add a playlist that I might be able to attach to the bottom with thumbnails- but my poor brain has stopped working and I just can’t think straight enough to add a class to pull in the thumbnails and the playlist – I might be going bonkers. I thought I should let you see what I did with your mp3.

    http://home.comcast.net/~lruit/Music/mp3.html

    Thanks again for letting me play with this.

    Regards,

    Lin

  54. Lin on July 22nd, 2008 8:10 pm

    Thanks JadenUk and Quince – for getting my mind looking into playlists.

  55. Ryoma on July 22nd, 2008 8:11 pm

    Hi Lin,

    You done a great job….

    Can share you source files some where..

    Is really cool player..

    Thanks.

    Ryoma

  56. jared on July 23rd, 2008 2:13 am

    lin, thats beautiful. love the visualization. do share the source if you feel compelled to.

  57. Quince on July 23rd, 2008 6:51 am

    Lin, very cool. I am happy to help you with the dynamic images part, but you will need to send me your source or post a link to it here. Also I have a great script from Seb at plugin media in England that makes smoke. I think it would be really cool to add that to your equalizer bars as they hit the peaks. Did you want that picture in the background to be the cd cover or somethin like that?

    Also, Jared I think this would make a very good example of polymorphism with your slideshow class.
    If I send you the flv of how to do it can do you have a flv player already or will you need a player too and what size will be best for your site?

    Thanks!
    Quince

  58. Lin on July 23rd, 2008 5:45 pm

    Ryomi- At the current time I cannot provide anyone with a source code- my apologies. But if it helps you at this time. Jared and Quince are the experts here- I learnt from watching their posts. Thank you for your kind words -because I have changed the skin many many times before.

    Jared , thanks again for your inspiring mp3 player and your kind words.

    Quince , thank you for your kind words and your willingness to give great advice.

    Regards,

    Lin

  59. jared on July 24th, 2008 5:04 am

    cheers lin. im no expert. i just keep trying.

  60. Allen Brunson on July 24th, 2008 11:55 am

    i would like to compile this on my own and make changes. alas, i don’t own any of the expensive adobe apps, i only have access to the flex 3 sdk. as far as i can tell, its swf compiler cannot deal with FLA files, so I can’t get at the assets inside your mp3.fla.

    is there any recourse, other than buying adobe’s authoring programs?

    thanks

  61. Sanchaita on July 29th, 2008 10:58 am

    it is really nice, i tried to make a play list for this player but i cant so can you help me please

  62. CJ on August 6th, 2008 11:20 pm

    hey…i’m totally loving this player…thnx a lot!
    i’ve already used it on one site..
    but i’m working on a project where i need to embed this into a container swf…in the Mp3player.as there is a reference to the stage to activate the trackingOff function…but when i load the swf into my file, i get the #1009 error…can you tell me how can i connect the stage bit to my swf…i’ve been reading about the ADDED_TO_STAGE and senocular’s StageDetection.as but i can’t seem to figure out how to use it….

    can you release a code that will make the player easy to embed into not jus html but also container swfs?…

    cheers

  63. Craig on August 8th, 2008 12:07 pm

    CJ I was have a problem myself with loading the file into another swf. I found that on line 63 of the Mp3Player.as

    stage.addEventListener(MouseEvent.MOUSE_UP, trackingOff);
    I removed “stage.” from the line and it imports fine

    addEventListener(MouseEvent.MOUSE_UP, trackingOff);

    Hope this helps

  64. heather on August 14th, 2008 12:28 pm

    Just a heads up for folks not aware:

    Bug with Sound channel position and mp3s less than 128kbps AND/OR different than 44.100 kHz

    (itunes will show you all this info for the file)

    weblink i found this on:
    http://www.stevensacks.net/2008/08/07/bug-with-sound-channel-position-and-mp3s-less-than-128kbps/

    If you have an mp3 file that is less than 128kbps and you get its channel.position at a particular point in time and try to play from that position it jumps ahead in the file. The amount it jumps ahead is based on how far away it is from 128kbps (a 56kbps file will jump more than a 64kbps one).

    Cheers!

    Heather

  65. leefyofcheese on August 21st, 2008 6:36 am

    Hi…Great player by the way…I want to get it to load into a clip on my stage..The code i normally use to load into a clip is

    var loader = new Loader();
    this.addChild (loader);
    loader.load (new URLRequest(“mp3.swf”));

    loader2.addChild(loader)

    but this is causing an error where it can’t find the doc.class of the mp3 player (i think)…I have never loaded anything so advance into a clip before so im not sure if i need to do it differently….

    please help…I will leave a link on the player to you.. :-)

  66. ValC on September 2nd, 2008 6:42 am

    Is there any way to get this to grab mp3s from my Flash Media Server 3 (FMS3)?

  67. steve on September 5th, 2008 8:43 pm

    This is really great – thanks a lot.

  68. RC on September 6th, 2008 7:23 pm

    in the mp3.fla file do you have to do anything with the linkage of the movie clips?

  69. Quince on September 7th, 2008 7:28 am

    Just a note to all the people who keep asking can you do this and that for me, can you add this for me…
    The idea is to show you great code!!!
    Where and how you extend it is up to you. You have downloaded a zip file and know where to get it again if need be. Don’t be afraid to possibly break the code trying to make an addition to the player.

    Either you want to learn flash and you will keep trying to fudge with code that Jared has posted to get an understanding and extend it. Or your just looking for a free script(fine too we have all done it as a quick resolve). If you want the player to be more than it is now help and add the part you want then post it or a link to it back here.

    Some people had other questions to answer:

    ALLEN – Buy flash if you want to work inside a fla please note Flash CS4 is coming at the end of Oct. start of Nov. I would wait until then.

    VALC – The player is not set up for FMS. You would need to change how the functionality works in many places.

    Thanks to Jared and everyone else that has made this such a excellent player.

    Quince

  70. watashi on September 14th, 2008 10:18 am

    Hello!

    thank you very much for your player: it’s really impressive!

    I removed the balance bar but I can’t set the volume at half value because only one channel work and the volume is always at the maximum level.

    Can you help me?

  71. Jose on September 15th, 2008 12:01 am

    This is an awesome app. Kudos to the dev. I am wondering if someone knows how i can add a playlist menu to choose what song to play? I am guessing i need i enumerate the xml list somehow then display it in a movie clip somehow but not sure how to do it and/or where to start.

    Any ideas and or fla with a playlist menu added?

    -noob

  72. Heather on September 15th, 2008 9:32 am

    Watashi,

    I had that issue as well. See if this works for you:

    // Volume Controls
    volumeBound = new Rectangle(0,vBar.vBarKnob.y,vBar.vBarBg.width,0);// boundary so volume will stay within the vBarBg
    vBar.addEventListener(MouseEvent.MOUSE_DOWN, volumeMouseDown);

    vBar.vBarKnob.x = vBar.vBarBg.width / 2;

    ——Side———————–
    ——Note———————–

    I forgot to say this before when I posted – Thank you, Jared, for an awesome player…This is a great example to learn from and build off of!

  73. Jmm on September 16th, 2008 1:01 am

    The player is amazing, Thanks. I do have one issue that I couldn’t find above (There’s quite a bit of stuff up there) the player seems to bog down in the buffering stage if the “next” or “previous” buttons are hit several times in succession (or back in fourth quickly) before the files are completely downloaded.

    By bogged down I mean,
    -the music stops playing
    -the % downloaded disappears
    -the bar % downloaded disappears
    -the artist/title shows “buffering” only

    I do realize this probably causes multiple files downloading at once but shouldn’t the % info reset and song play?

    Just seems kinda of buggy like this. Especially if someone wants to skip thru the songs quickly to see what songs are offered first before choosing one to listen to.

    Any ideas towards the fix? Once again amazing player.

  74. Jmm on September 18th, 2008 4:39 pm

    Hey what’s with the silent treatment? 3 days pass and no one is home? Is no one else experiencing the above mentioned problem? ANY comment in regards to this would be helpful.

  75. watashi on September 24th, 2008 11:01 am

    Heather

    your indication works perfectly!

    Thank you for your help!

    watashi

  76. Craig on October 11th, 2008 10:14 am

    This is a really great MP3 player. Thank you for sharing it.
    I’ve incorporated it into my website, and it works very well. I have a FLV player on my site, and I need the MP3 player to pause when a user clicks the button to advance to that frame. I’m a real AS3 novice, so I really don’t know what to do. Can you help me?
    This is my button:
    video_btn.addEventListener(MouseEvent.CLICK,videoclickFunction);
    function videoclickFunction(event:MouseEvent):void {
    gotoAndPlay(“videos”);
    }
    Then it would be great to start it again when the user goes back to the last frame. I have another button to do that.
    Thanks!

  77. jared on October 11th, 2008 11:58 am

    Craig great job at getting this far. Look at the noplay.zip file I have included in the post. Look at lines 192 and 193 to see how those two lines work together to stop the playback. Now just create another dispatchEvent, call it playSound or something, to get it playing again when the user clicks out of the video frame.

  78. Joey Green on October 11th, 2008 11:44 pm

    hi jared, nice player, thanks

    i can’t get ID3 info nor spectrum to show

    not changing anything but song urls in playlist xml

    i made sure i ‘convert ID3 tags..’ to version 2.3, still no show .. and no spectrum either

    how is it working in your demo but not mine?

    http://joegreenwood.com/mp3player/mp3.html

    thanks so much for the player

    joe

  79. jasun on October 13th, 2008 1:00 pm

    First of all, THANKS A BUNCH! This player helped me so much in learning more about AS3 and how the code works, in unity with a .XML file and setting a document class, etc.

    I do have one small problem that I am unable to fix. I use the .AS file you posted to make it not play automatically, and it seems to cut off about a second from every song then skip to the next one. How would I make it wait until each song completely plays through first?

    Any help from anyone would be appreciated. Thanks!

  80. jared on October 14th, 2008 5:06 am

    i’ve found the cause of the “buffering bug”. will post a fix soon. all i can say now is that it involves using _sound.close() to stop any data from downloading before loading the track again.

  81. Tom on October 14th, 2008 5:27 am

    Thanks

  82. ActionScript 3 XML MP3 Player Update 1.1 | Simplistika on October 14th, 2008 5:49 am

    [...] from version 1.0. [...]