# As for loading audio

**URL:** <https://forum.kirupa.com/t/as-for-loading-audio/175025>\
**Category:** Uncategorized\
**Created:** [January 11, 2006, 4:49am UTC](https://forum.kirupa.com/t/as-for-loading-audio/175025 "2006-01-11T04:49:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumire](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@sumire](https://forum.kirupa.com/u/sumire)\
**Post date:** [January 11, 2006, 4:49am UTC](https://forum.kirupa.com/t/as-for-loading-audio/175025/1 "2006-01-11T04:49:19Z")

</div>

I used the tut. to make a volume control slider. The .mp3 file is externally loaded, because it’s huge.

Two questions.

1. How do I easily and very quickly compress an .mp3?

2. How do I change the AS to play the song once it’s 25% loaded, instead of fully (total) loaded?  
Here is the AS I have:

onClipEvent (load) {  
mySound = new Sound();  
mySound.loadSound(“five.mp3”, false);  
mySound.onLoad = mySound.start;  
//set the initial volume  
\_root.volume=15;  
//put the “dragger” movie clip in right position according to the volume  
dragger.\_x = line.\_width\*\_root.volume/100;  
}  
onClipEvent (enterFrame) {  
downloaded = mySound.getBytesLoaded();  
total = mySound.getBytesTotal();  
if (downloaded != 25/100) {  
\_root.dl = “downloading song…”;  
} else {  
complete = 1;  
\_root.dl = “”;  
}  
mySound.setVolume(\_root.volume);  
}

thanks in advance!  
:hair:
