# Loadmovie with progress bar

**URL:** <https://forum.kirupa.com/t/loadmovie-with-progress-bar/32965>\
**Category:** Uncategorized\
**Created:** [October 13, 2003, 8:22pm UTC](https://forum.kirupa.com/t/loadmovie-with-progress-bar/32965 "2003-10-13T20:22:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thebigcheese](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@thebigcheese](https://forum.kirupa.com/u/thebigcheese)\
**Post date:** [October 13, 2003, 8:22pm UTC](https://forum.kirupa.com/t/loadmovie-with-progress-bar/32965/1 "2003-10-13T20:22:34Z")

</div>

Hi -  
I’m trying to make a button that will load a movie “m1.swf” intp a movieclip myMC

I can do that - the thing is, i want to make a progress bar thart will say how much is loaded. Ive seen it done, but when i try it, it doesnt work.

Can somebody please help me - thanks!

---

<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:** [October 22, 2003, 7:41am UTC](https://forum.kirupa.com/t/loadmovie-with-progress-bar/32965/2 "2003-10-22T07:41:25Z")

</div>

Thx very much!! An excellent introduction!

Dorian

---

<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:** [September 6, 2004, 2:03am UTC](https://forum.kirupa.com/t/loadmovie-with-progress-bar/32965/3 "2004-09-06T02:03:57Z")

</div>

> [@thebigcheese](#):
>
> [AS]\_root.loadMeAMovie = function(mname) {  
> \_root.preloader\_clips.front\_bar.\_width = 0;  
> \_root.myMC1.loadMovie(mname);  
> \_root.preloader\_clips.onEnterFrame = function() {  
> \_root.preloadMC(\_root.myMC1);  
> };  
> };  
> \_root.preloadMC = function(mc) {  
> var bLoaded = mc.getBytesLoaded();  
> var bTotal = mc.getBytesTotal();  
> var twidth = \_root.preloader\_clips.back\_bar.\_width;  
> \_root.preloader\_clips.front\_bar.\_width = twidth\*bLoaded/bTotal;  
> if (bLoaded == bTotal && bTotal\>0) {  
> delete this.onEnterFrame;  
> } else if (bLoaded == -1) {  
> //failed load  
> }  
> };  
> //\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Load the default movie  
> \_root.loadMeAMovie(“home.swf”, \_root.hcolor);[/AS]
> 
> myMC1 is the movie to load into  
> preloader\_clips.front\_bar is the loader bar  
> preloader\_clips.back\_bar is the original bar width
> 
> this code should work - it does for me - sorry it toook so long i was busy

Hi Big Cheese,

This looks like what I’m trying to do. Could you explaine it a little? I’m trying to load different movies into a base movie and have a loader give a percentge of the .swf loaded.

What does \_root.loadMeAMovie(“home.swf”, \_root.hcolor); do?

Anything you could do to clariafy this would be great. I think I’m close, just can’t get it to work.

Thank you!
