# Secuencial Preloader

**URL:** <https://forum.kirupa.com/t/secuencial-preloader/51370>\
**Category:** flash\
**Created:** [May 12, 2004, 1:32pm UTC](https://forum.kirupa.com/t/secuencial-preloader/51370 "2004-05-12T13:32:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lobo\_](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@Lobo\_](https://forum.kirupa.com/u/Lobo_)\
**Post date:** [May 12, 2004, 1:32pm UTC](https://forum.kirupa.com/t/secuencial-preloader/51370/1 "2004-05-12T13:32:38Z")

</div>

I have this code in my movie, in the first frame, and I want to know how can I preload other movies ( **in secuense** : music\_1.swf,music\_2.swf,3,4,5 …) making use of the same code and a button.

[COLOR=DarkRed]\*For example, press a button, and load movie 2, press movie 3 etc… using this preloader[/COLOR]

Thank you for any help  
_Lobo_

```php

mcLoader = new MovieClipLoader();
loadListener = new Object();
mcLoader.addListener(loadListener);
mcLoader.loadClip("music_1.swf", loader_mc);
loadListener.onLoadStart = function() {
	loader_mc.stop();
};
loadListener.onLoadProgress = function(loadTarget, loadedBytes, totalBytes) {
	preloaded = Math.floor(loadedBytes/totalBytes*100);
	loaderText_txt.text = preloaded+"% loaded into "+loadTarget;
	bar_mc._xscale = preloaded;
};
loadListener.onLoadComplete = function() {
	loaderText_txt._visible = false;
	bar_mc._visible = false;
	loader_mc.play();
};

```
