# Preloader and sound problem

**URL:** https://forum.kirupa.com/t/preloader-and-sound-problem/94260
**Category:** Uncategorized
**Created:** [November 10, 2003, 9:46pm UTC](https://forum.kirupa.com/t/preloader-and-sound-problem/94260 "2003-11-10T21:46:53Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![colag](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@colag](https://forum.kirupa.com/u/colag)
#### Post date: [November 10, 2003, 9:46pm UTC](https://forum.kirupa.com/t/preloader-and-sound-problem/94260/1 "2003-11-10T21:46:53Z")

</div>

i have a .swf movie which is about 350k and all but 25k is an embedded mp3. but my preloader doesn’t work properly in the sense that it only appears once the the mp3 has downloaded. at the moment the preloader reads:

onClipEvent (enterFrame) {  
loading = \_parent.getBytesLoaded();  
total = \_parent.getBytesTotal();  
percent -= (percent-((loading/total)_100))_.25;  
per = int(percent);  
percentage = per+"%";  
loadBar.\_width = per;  
if (percent\>99) {  
\_parent.gotoAndStop(2);  
}  
}

the mp3 is in a in a variable ‘tune’ which is in a clip called ‘sound’ and that clip is in a clip called ‘music’. music is found on the root level.  
tune = new Sound();  
tune.attachSound(“myMP3”);  
tune.start(0,999);

any help will be gratefully received.  
thanx

---

<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: [November 10, 2003, 10:09pm UTC](https://forum.kirupa.com/t/preloader-and-sound-problem/94260/2 "2003-11-10T22:09:33Z")

</div>

could you ad a fla file?

---

<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: [November 10, 2003, 10:54pm UTC](https://forum.kirupa.com/t/preloader-and-sound-problem/94260/3 "2003-11-10T22:54:28Z")

</div>

hi,  
you can see my .fla the following url:  
[http://www.audiogroove.co.uk/audio1.0.fla](http://www.audiogroove.co.uk/audio1.0.fla)  
thanx,  
colin

---

<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: [February 23, 2004, 6:36am UTC](https://forum.kirupa.com/t/preloader-and-sound-problem/94260/4 "2004-02-23T06:36:23Z")

</div>

Great! Is this true for externally loaded mp3s too? That is what I was refering to. Any/all comments are welcome.

> \*Originally posted by Voetsjoeba \*  
> \*\*I don’t know where you got that idea from, but it _is_ possible to loop a sound that has been loaded with loadSound, both for streaming and non-streaming sound:

Streaming:

```auto

yourSound = new Sound();
yourSound.loadSound("yoursong.mp3",true);
yourSound.onSoundComplete = yourSound.start;

```

Non-streaming:

```auto

yourSound = new Sound();
yourSound.load("yoursong.mp3",false);
yourSound.start(0,999);

```

\*\*

---

<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: [February 23, 2004, 7:36am UTC](https://forum.kirupa.com/t/preloader-and-sound-problem/94260/5 "2004-02-23T07:36:01Z")

</div>

Heh, sounds loaded using loadSound _are_ externally loaded. Only if you’d use attachSound, that’d be non-dynamic (from the library).

---

<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: [February 24, 2004, 9:41am UTC](https://forum.kirupa.com/t/preloader-and-sound-problem/94260/6 "2004-02-24T09:41:55Z")

</div>

Check me out, [non-dynamic](http://megansorel.com/newness/)! Couldn’t have done it without you guys and your posts. THANK YOU!  
:trout:
