A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Preloaders and MP3's

  1. #1
    Junior Member
    Join Date
    Mar 2003
    Location
    Halifax, NS
    Posts
    7

    Preloaders and MP3's

    OK, My website is coming along fairly nicely, but I seem to be missing something in terms of preloaders.

    If I have a preloader in a .swf that is being loaded into an empty mc, should that preloader refer to _root or layer0? If someone can show me some code that will work once the mc is in a larger .swf that would be sweet.

    Also, I have seen sites that include lists of MP3's that are streamable but show a loading bar/preloader for each song. I have also seen sites with buttons that when you click them an MP3's just begins to play almost right away. My songs don't show until they are fully loaded, and they interupt playing songs when the are complete.

    If someone wants to throw out some ideas I would appreciate it.

    If you want to check out the site as is, go to www.candali.com. Go to DOWNLOADS > MUSIC.

    Thanks.

    P.S. -- I know there are some other glitches, but I have to prioritize here...

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    As far as I know, when you preload a song, it ends up being converted to an 'event' sound, which must load all the way before it plays. To make a sound start right away, you want to stream it. To stream a sound, publish as F6 and use this code in a frame, or a button:

    mySound = new Sound();
    mySound.loadSound("music1.mp3", true);

    Put the mp3 on the server, not in the movie library.

    Your preloader for external swf's needs to use the word this in place of _root to work. Look at the one in the attachment.
    Attached Files Attached Files

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center