# Same old question..how can i got preloading before i load movie

**URL:** https://forum.kirupa.com/t/same-old-question-how-can-i-got-preloading-before-i-load-movie/60758
**Category:** Uncategorized
**Created:** [August 12, 2004, 9:35am UTC](https://forum.kirupa.com/t/same-old-question-how-can-i-got-preloading-before-i-load-movie/60758 "2004-08-12T09:35:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![xyeight](https://avatars.discourse-cdn.com/v4/letter/x/ba9def/32.png) [@xyeight](https://forum.kirupa.com/u/xyeight)
#### Post date: [August 12, 2004, 9:35am UTC](https://forum.kirupa.com/t/same-old-question-how-can-i-got-preloading-before-i-load-movie/60758/1 "2004-08-12T09:35:32Z")

</div>

i try do a preloading in my external movie, let say aboutus.swf  
then i wanna puch a button to load aboutus.swf movie into my main movie called Index.  
but before it load i wanna see a loading so that my client won’t have to wandering if the button is functioning or not…  
please someone tell me what should i do

---

<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: [August 12, 2004, 11:15am UTC](https://forum.kirupa.com/t/same-old-question-how-can-i-got-preloading-before-i-load-movie/60758/2 "2004-08-12T11:15:34Z")

</div>

anybody wanna help me with this?

---

<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: [August 12, 2004, 6:56pm UTC](https://forum.kirupa.com/t/same-old-question-how-can-i-got-preloading-before-i-load-movie/60758/3 "2004-08-12T18:56:45Z")

</div>

> [@xyeight](#):
>
> anybody wanna help me with this?

start a new movie, create 3 buttons instance names btn1,btn2,btn3.  
create a textfield with instance name percent\_txt  
you need to store 3 movies, movie1.swf,movie2.swf,movie3.swf in the same folder.  
type this on the frame.

assessLoad = function (clip) {  
var kbLoaded = Math.floor(clip.getBytesLoaded()/1024);  
var kbTotal = Math.floor(clip.getBytesTotal()/1024);  
percent = kbLoaded/kbTotal;  
percent\_txt.text = Math.floor(percent\*100)+“%”;  
//any animation you can script here.  
if ((kbLoaded == kbTotal) && kbTotal\>1) {  
endPreload(clip);  
}  
};  
endPreload = function (clip) {  
clearInterval(preload);  
//maybe make animation.\_visible = false etc  
};  
createEmptyMovieClip(“paper”, 1);  
for (i=1; i\<4; i++) {  
\_root[“btn”+i].ivar = i;  
\_root[“btn”+i].onPress = function() {  
loadMovie(“movie”+this.ivar+“.swf”, paper);  
preload = setInterval(assessload, 50, paper);  
};  
}

you will need to upload to the web to test.

---

<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: [August 16, 2004, 7:58am UTC](https://forum.kirupa.com/t/same-old-question-how-can-i-got-preloading-before-i-load-movie/60758/4 "2004-08-16T07:58:14Z")

</div>

yup…it works already…thanks stringy

---

<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: [August 16, 2004, 12:38pm UTC](https://forum.kirupa.com/t/same-old-question-how-can-i-got-preloading-before-i-load-movie/60758/5 "2004-08-16T12:38:54Z")

</div>

> [@xyeight](#):
>
> yup…it works already…thanks stringy

welcome
