Sound loop problem

Ive done a loop of a sound. But I havenig problems to make it sound properly. After it played it takes 1 second pause before it play it again.
http://w1.736.comhem.se/~u73611132/tacua/musik.fla
Can somebody help me out with this?

I’ll take a look.

A couple of things. Flash, in general, has a built-in defect with looping sounds. There always is a little unwanted pause, but yours was exaggerated. Here’s one way to remove pause. Your sound was called, infectedbydevil, so I named the sound object that.

// Sound Objects
infectedbydevils = new Sound();
infectedbydevils.attachSound(“infectedbydevils01”);
infectedbydevils.start(0,0);
infectedbydevils.onSoundComplete = function() {
infectedbydevils.start(.1, 0);
};

Basically, that tells the sound to start a tenth of a second from the beginning of sound object.

I don’t think I can embed flash here, so here’s a link to how that sounds.

http://www.aspirin99.com/test/musik02.swf

And, here’s a link to the fla

http://www.aspirin99.com/test/musik02.fla

The other thing is, there is an art to creating sounds that loop in flash, much like the art of creating an image that tiles well. Some sounds loop better than others. I’m not an expert in that art, but I know that the sound you’ve chosen is not one edited to loop well.

Edit: Oh, and if you want to see more on this, there’s a good tutorial at:

http://www.kennybellew.com/tutorials

thanx alot! Very good reading. But I want the sound to start directly without any button to press. how should I do then?

Just substitute the code in the fla with the code above. I change to fla to use a button because I thought I was going to embed the file here, only to learn that I can’t embed here. The code, infectedbydevils.start(), will start the sound. Without the onSoundComplete, this would only play the sound once. However, the onSoundComplete function causes it to repeat at the conclusion of the sound.

uh im not good at this…
// Sound Objects
infectedbydevils.start()
infectedbydevils = new Sound();
infectedbydevils.attachSound(“infectedbydevils01”);

infectedbydevils.onSoundComplete = function() {
infectedbydevils.start(.1, 0);
};

whats wrong with the code? it wont start… you had this code on your play button on(release) {
_root.infectedbydevils.start(0, 0);
}
is that suposed to be somewhere?

// Sound Objects

infectedbydevils = new Sound();
infectedbydevils.attachSound(“infectedbydevils01”);
infectedbydevils.start()
infectedbydevils.onSoundComplete = function() {
infectedbydevils.start(.1, 0);
};

You need to define the sound object before you tell it to start.

infectedbydevils.start() is the same as infectedbydevils.start(0,0)

In the above, the first zero represents the offset position, in seconds, that you want to start the sound. The second zero is the number of times you want it to loop. Both should be 0 for your code because you are creating the loop and offset with the function.