# Background Soundtrack issue

**URL:** <https://forum.kirupa.com/t/background-soundtrack-issue/111251>\
**Category:** Uncategorized\
**Created:** [May 25, 2004, 8:13am UTC](https://forum.kirupa.com/t/background-soundtrack-issue/111251 "2004-05-25T08:13:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Obie](https://avatars.discourse-cdn.com/v4/letter/o/b2d939/32.png) [@Obie](https://forum.kirupa.com/u/Obie)\
**Post date:** [May 25, 2004, 8:13am UTC](https://forum.kirupa.com/t/background-soundtrack-issue/111251/1 "2004-05-25T08:13:37Z")

</div>

I would like to have a 35 second soundrtrack playing (looping) in the background of my site.

My problems are:  
How do I get the soundtrack to loop continuously (stream or event)?

Why does the soundtrack play again (start) when an instance of it is already playing (creating 2 layers of sound)?

I am a beginner and I have 4 books that dont seem to give me the answer to my problem… :puzzle:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 10:21pm UTC](https://forum.kirupa.com/t/background-soundtrack-issue/111251/2 "2004-05-26T22:21:46Z")

</div>

you can loop an audio clip with actionscript if you have an audio clip in your library with a linkage id set.

say, for example, you have an audio clip in your library with a linkage id of sound\_1. you can loop that with a bare function like so:

```
//initate the sound object
sound_1= new Sound();
//attach the "sound_1" clip from your library to the newly made sound_1 object
sound_1.attachSound("sound_1");
//play the sound
sound_1.start();
assign an onSoundComplete function that will play the sound again after it has finished.
sound_1.onSoundComplete= function(){
    sound_1.start();
};

```

there are several other ways to go about it, but this is just one. its not as confusing as some other methods, and works fine.

```
hope this helped.

sam
```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 10:22pm UTC](https://forum.kirupa.com/t/background-soundtrack-issue/111251/3 "2004-05-26T22:22:52Z")

</div>

www.kennybellew.com/tutorial

imho, the best sound tutorial I’ve ever seen.

:hr:
