AS3 Easy gapless sound looping solution

If you have come accross the issue of sounds not looping seamlessly in a Flash project then try the following.
Simply offset the start of the sound by 80 milliseconds:
[cc lang=”actionscript3″]
var channel:SoundChannel = new SoundChannel();
var sound:Sound = new Sound();

sound.load(new URLRequest(‘sound.mp3’));
channel = sound.play(80);
[/cc]


Comments

4 responses to “AS3 Easy gapless sound looping solution”

  1. […] If you have come accross the issue of sounds not looping seamlessly in a Flash project then try the following.  […]

  2. good thanks for ur post

  3. For Flash CS6, I did some tests and I found the number to be around 27.5, as far as I can tell.

  4. dorgla.de Avatar
    dorgla.de

    I think this always depends on the specific sound. I use different values for different soundfiles. I also noticed, that there still is a Gap on Android, but that may be due to a diffetent issue.

Leave a Reply