A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Load external music to play in loops??

  1. #1
    Junior Member
    Join Date
    Oct 2001
    Posts
    27

    Load external music to play in loops??

    I've been trying to load my music and let it play it continuosly.
    And yes, the music is being played, but the problem is that it doesn't LOOP!! Wana know if there's error in my scripting, pls help, I'm no good in scripting, thanx!!

    mySound = new Sound();
    mySound.loadSound("music.mp3", true);
    mySound.start(0.999);
    mySound.setVolume(30);
    gotoAndPlay("tech", 1);

  2. #2
    muvipix.com
    Join Date
    May 2001
    Location
    Maine
    Posts
    289
    I ran into this too. I guess in theory, streaming will not loop unless you force it, and even then, you will not get an actual "loop" as it's meant to be (or as you think it should be). I beleive the only way you'll get a stream to repeat is to use the onSoundComplete() call. If it's a seamless type loop you may as well create a linkage export or load a swf. The 'start' command does nothing for stream as a stream will start playing anyway when it gets enuf buff. It does however restart (latest player plugin) a stream once loaded. You have options here.
    Regards,

    Ron

  3. #3
    Junior Member
    Join Date
    Jan 2003
    Posts
    4
    Here is howto loop external music:

    myMusic.onSoundComplete=function() {
    myMusic.start(0,999);

    }

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