Flash MP3 Player Tutorial – Part 2

In this second part of the tutorial I show how to implement some simple controls into the music player. First I show how to create a play/pause toggle button followed by a simple “next” button. Lastly I go over the ActionScript needed to implement these new controls. Check it out at http://www.gotoandlearn.com.

Hope you like it!
Lee


Commentary

  1. Pratik says:

    Thanks!! Been waiting for this for sooooo long :)

  2. sike says:

    You are tbe greatest teacher I met online, thanks lee.

  3. Pixelmixer says:

    wow, top-notch tutorial. I love when i watch these and come out feeling like I really learned something and could take that knowledge and build something awesome with it.

  4. HomeSetup says:

    I agree wit sike, Lee you are by far the best teacher, I can’t wait for the next one.

    Thanks so much
    Take care!!!

  5. Nice as always :-)

    Just I was wondering Maybe it would be good if it had continiued play or when it finishes playing one sound it starts at next one… that setting would be sweet :-)

    have a nice day :-)

  6. andkyo says:

    Very nice tutorial….Lee
    but, i have a question….
    Is posible view the tutorials that you have offline?
    by…CSS and Flash….the stage class

    veri good work and teaching Lee

  7. Name says:

    i think in a tutorial you should at least tell what you are doing…..all of a sidden you have this movie clip already coded…..whut kind of tutorial does that??? otherwise it is great until that point

  8. idiotgreg says:

    This was fantastic, helped a ton and left me not asking others for help for once. Thanks man.

    Looking forward to part 3…

  9. KnutKnut0))) says:

    Very nice tutorial. Helped me a lot. When can we expect part 3?

  10. Dermo says:

    Thanks this is great. You explain it so well and it is paced at a perfect speed i.e. I can type as you talk. ANy news on part three?

  11. Dermo says:

    One quick question: I can’t recall you mentioning this in the tutorial. After tutorial two the songs no longer play one after another, is there a work around this?

  12. Dermo says:

    Sorry about that last comment, if I add
    s.onSoundComplete = playSong;
    to the end of the playSong function the files now loop again. I’m sure there a better way to do this but my programming skills are quite poor.

    Thanks for all the great help on this site.

  13. morbith says:

    thank you…lookiing forward to part three…

  14. Stoneyharrie says:

    this tutorial is great :D :D
    it really helped me
    the flash works, but at my site i dont hear any music, can you tell me whats wrong? my flash,, or my ie settings?
    youtube and such work with sounds,,

    cheers for the good tutorial :D

  15. casey says:

    Okay maybe I am not seeing it here. I can’t seem to get the tutorials. I click the links and nothing happens. Where do I got to view these tuts?

    thanks
    -C

  16. emzilla says:

    Are there source files for these?

    Many thanks. V good tutorial

  17. Stephen Levinson says:

    Hey Lee,

    By any chance do you think you can upload the source files for this? It’d make it a whole lot easier for me to get the mp3 player for a website. I of coarse will change the songs and graphics. Would be a HUGE help.

    Thanks,
    Steve

  18. Rusell says:

    Sorry for my bad english, I’m an Italian guy who wanna start with Flash after few years with PHP.
    It’s a great tutorial but I’ve experienced a problem when I run the swf:
    Error opening URL “file:///C|/apache/htdocs/flashplayer/undefined” appears even if I double checked the code and it’s exactly the same as Mr Lee show in the tutorial.
    May you help me? It would be great and it would makes me excited to continue learing flash.
    Thanks a lot
    Russell

  19. Ani says:

    Hey,

    I am having the exact problem as Russell, and it’s driving me up the wall. It would be great if someone could show us how to fix it…

    Thanks a bunch!

  20. Morris says:

    ok i dunno if this will help but on my player i had this code
    ———————————————
    this.sound_obj.onSoundComplete = function() {
    (song_nr == songfiles.length-1) ? _global.song_nr=0 : _global.song_nr++;
    _root.sound_mc.songStarter(songfiles[song_nr], songname[song_nr]);

    ——————————————–
    so i only changed “songiles” to “songfile” and i dont get that error anymore.
    i hope this helps

  21. Evan says:

    Any chance that you might be able to update this to AS3?

    Just trying to learn flash now and decided to start with AS3 since it is current.
    Any help would be much appreciated.
    Great work tho.

Leave a Comment