A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] streaming MP3 with loadSound

  1. #1
    cre8ive
    Guest

    resolved [RESOLVED] streaming MP3 with loadSound

    I'm having problems with loadSound and streaming. This code is straight out of documentation with the mp3 name changed.

    Code:
    mySound = new Sound();
    mySound.loadSound("test.mp3", true);
    mySound.start();
    I previewed in Explorer and the sound started about 5 seconds into the song. Then I previewed in Flash and it started at the beginning.

    To correct the problem I tried giving the start an offset of 0. No luck. Then I tried an offset of 30 seconds to get a different result. No luck the song still started 5 seconds in.

    I removed the start command completely and still had the same results. Start seems completely irrelevant when loading an mp3 as a stream. I even tried stopping the sound and starting it again. It stayed stopped.

    Anyone else finding similar results? If start doesn't effect a streaming mp3 does that mean you can't control it? No Fast-forward? No Rewind?

    I finally figured out how to fix the five second delay by place the loadSound one frame after declaring the sound object.

    Maybe it's because I'm testing MX out with the trial, but this seems pretty shotty. From the mouths of MM

    Code:
    The code should look like this:
     
    mySound = new Sound();
    mySound.loadSound("http://www.foo.com/SoundsToLoad/sound14.mp3", true);
    mySound.start();
    From this I assume one could control a streaming mp3.

  2. #2
    Junior Member
    Join Date
    Sep 2000
    Posts
    17
    I don't think you need to use start();
    I just used:

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

    And it started playing straight away. I think you only need start() for event sounds, not streaming sounds.

  3. #3
    cre8ive
    Guest
    srollason, yeah I did some more reading and the start sound isn't used with loadSound set to stream.

    It's unfortunate I was hoping you could control the stream. I guess I'll have to keep using swiftMP3 and SwiffPEG.

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