# Preloader movieclip

**URL:** <https://forum.kirupa.com/t/preloader-movieclip/60663>\
**Category:** Uncategorized\
**Created:** [August 11, 2004, 1:39pm UTC](https://forum.kirupa.com/t/preloader-movieclip/60663 "2004-08-11T13:39:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xul\_solar](https://avatars.discourse-cdn.com/v4/letter/x/ec9cab/32.png) [@xul\_solar](https://forum.kirupa.com/u/xul_solar)\
**Post date:** [August 11, 2004, 1:39pm UTC](https://forum.kirupa.com/t/preloader-movieclip/60663/1 "2004-08-11T13:39:00Z")

</div>

hi, i wanna know how do i insert an animation in a preloader…i dont want the clasical load bar progress…  
when the page its being loading i need that a cube move  
did anyone understand me?  
help!  
thanks  
:pirate:

---

<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 11, 2004, 3:13pm UTC](https://forum.kirupa.com/t/preloader-movieclip/60663/2 "2004-08-11T15:13:02Z")

</div>

im not an expert like many in here but i belive i can help with this one if i understood your question correctly.  
its basically the same as the tutorials u can find in this site with a tiny tiny twist.  
make a movie clip with whatever animation u want. put that movieclip on the stage and make sure how many frames your animation runs lets say 20 frames.

then in the first frame of your movie put the code:

```auto

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
if (bytes_loaded == bytes_total) {
	this.gotoAndPlay(21);
}

```

and in the frame number 20 you put the code:

```auto
this.gotoAndPlay(1);

```

when the load is done then flash will jump to frame 21 meaning u want to put the rest of your flash there. (u can change frame number etc in the code, just look for the number 21 and so on 😉 )

Hope i made some sense. I took the code from this url and modified it for your cause. If u get stuck its a good idea to read and try to understand the code:  
[http://www.kirupa.com/developer/mx/percentagepreloader.htm](http://www.kirupa.com/developer/mx/percentagepreloader.htm)

cheers  
MZA
