Results 1 to 4 of 4

Thread: Streaming .mp3s (MX 2004)

  1. #1
    Join Date
    Oct 2005
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Streaming .mp3s (MX 2004)

    Hi guys,

    I've got a flash that has around 10, 30sec .mp3 files. The problem is it's taking too long to load. I can't use a pre-load because of the format it's being presented in.

    The .mp3 are currently stored in the library. Would streaming them from a server make the flash load quicker?

    If so, how would I stream .mp3s in flash (sorry, I'm an almost total Flash Newbie)? It idea is simply press a button and the music plays...

    Thanks for your help,

    Max

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    What you want to do is stream the mp3's from an external source.

    use soundobject.loadSound("urlto.mp3",true) to "stream", which plays as it loads, not packet streaming like winamp.

    You can use the onSoundComplete event to execute code when flash finishes playing a sound.

    or if you are using continuous play, load on exit, etc you can use something like:

    Code:
    my_sound = new Sound(this);
    my_sound.loadSound("http://www.MYSITE.com/SUBFOLDER/SONG.mp3",true);
    Trying to load that many files with the movie is going to take forever... although I haven't seen a format where you couldn't use a preloader.

    You can always use a preloader, even if it loads an external swf, the preloader doesn't have to be inside the loading swf
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    can we play shoutcast audio in flash this is live radio.

    it is a .pls file but you don't have to put in listen.pls as long as you have the ip and port number is possible

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Yes, you will have to rename the shoutcast pls to m3u though.

    so your url would go from: www.myshoutcast.doh:8000/listen.pls

    to: www.myshoutcast.doh:8000/listen.m3u

    Also note that Flash will not stream this for you, you will need to embed another media program like winamp.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •