A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: streaming help...

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    7
    Hello,

    I have 4 mp3s, each about 3.5 MB in size and I want them to play when a user clicks on a button. If I simply place the MP3s on a webserver and make a button on my swf file that is a direct link to the MP3, will microsoft media player begin and start streaming the music? If there is a better way, in flash MX for large files such as these?? please, please let me know. And if possible, please provide code.. i am only an intermediate at flash. Thanks soooo much in advance,

    Danielle Examault

  2. #2
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Hi Danielle,

    First off, I'm not yet familiar with Flash MX and sound, although I'm sure it isn't much different than using sound with Flash 5. There is an issue with MX when streaming - so I would avoid streaming with MX for now.

    To stream your MP3's, you simply need to use the loadMovieNum(); function. It goes like this:

    Create a seperatae movie called firstTrack.fla, import your MP3. On the first frame of the movie - using the sound panel - select your music, choose streaming and open up the timeline to the end of the song.

    If your songs are running at around a Meg a minute, you will stream at 80-108 kbps which is OK for DSL or better connections, so you can just publish your firstTrack movie if that is your target connection speed.

    Now, in your main movie add this code to the button for you music:

    on (release){
    loadMovieNum("firstTrack.swf", 99);
    }

    This will load the new sound into level 99 of your movie, attatch the same code with the different music .swf names to each button. Flash will replace the old song with the new song when you load it into the same level.

    I like to taget the levels for "play" and "stop" buttons. You can do that like this:

    _level99.stop(); or _level99.play();

    I prefer this method to the stopAllSounds because you can restart the sound right where it left off.

  3. #3
    Junior Member
    Join Date
    Apr 2002
    Posts
    7
    Thanks sooo much

    I will try it tonight.

    i really appreciate it.

    Take care,

    XOXO
    Danielle

  4. #4
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Your welcome,

    You can contact me if you get stuck.

    5guys@tcinternet.net

    5G

  5. #5
    Junior Member
    Join Date
    Apr 2001
    Posts
    3

    streaming issues in mx?

    i am wondering what the specific streaming issues (the known ones, at least) in MX are. i am currently working on a major project and we are having these issues sporadically across a diverse group of browsers and operating systems.

    none are posted on macromedia's website.

  6. #6
    Registered User
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    make sure your users have flash 6 r40 or greater when developing apps with loadSound().

    initial release r21 had many bugs with loadSound(), the main problems being that you could not stop mp3 from downloading once started and streamed mp3 ignored the start() method.

    second release r29 fixed this problem but still ignored the start() method.

    r40 and later seems to have fixed this problems atleast in my experience.

    you might take a look at FAQ #27 and FAQ #30 for additional undocumented issues with loading mp3s (not bugs).

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