A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: load mp3 WITHOUT streaming not working... argh

  1. #1

    load mp3 WITHOUT streaming not working... argh

    Racked my brain over this all day...

    I can get this code to work if I stream an mp3 but if I don't then it won't perform any soundObject.onLoad or soundObject.getBytesLoaded or soundObject.getBytesTotal... crazy.

    Here is the code:
    On first frame of movie clip I have:

    audio = new Sound(this);

    On a button in the same movie clip I have:

    audio.loadSound(_root.section+"/sound/"+_root.audio+".mp3", false);

    The button them tells the movie to go to this frame with this code:

    audio.onLoad = function () {
    audio.start();
    };

    I have tried putting the audio.start() on a different frame but that makes no difference. I have run test variables in the onLoad fucntion that don't show up so I guess it just is not performing the onLoad fucntion at all.

    Totall stumped

  2. #2
    Registered User
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    are you certain that the sound is actually loading. The sound should play automatically after it loads, no need for onLoad event to start playback.

  3. #3
    Hi hp3

    No, I'm not sure it's loading, I know it loads when I set it to stream (true) but it doesn't like when I set it to false... I test it locally as well so the sound should load instantly... still nothing.

    Any ideas

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