# This is killing me...preloader!

**URL:** <https://forum.kirupa.com/t/this-is-killing-me-preloader/94342>\
**Category:** Uncategorized\
**Created:** [November 11, 2003, 6:58pm UTC](https://forum.kirupa.com/t/this-is-killing-me-preloader/94342 "2003-11-11T18:58:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rave\_t](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@rave\_t](https://forum.kirupa.com/u/rave_t)\
**Post date:** [November 11, 2003, 6:58pm UTC](https://forum.kirupa.com/t/this-is-killing-me-preloader/94342/1 "2003-11-11T18:58:41Z")

</div>

This is my code in a movieclip which is loaded on the main timeline and the duplicated.

Its task is to load an image and i want to show the loading process.

temp is a textfield which should show the loading progress.  
but it says 0% then "infinity"and finally 100% but nothing in between.

What is the problem???

* * *

this.createEmptyMovieClip(“preloader”, 1000);  
this.createEmptyMovieClip(“container”, 1001);  
container.loadMovie(“images/” add imagename);  
container.\_visible = false;  
preloader.onEnterFrame = function() {  
var l = container.getBytesLoaded();  
var t = container.getBytesTotal();  
var getPercent = l/t;  
temp = Math.round(getPercent\*100)+"%";

```
if (l&gt;0 && l&gt;=t) {
	container._visible = 1;
	delete this.onEnterFrame;
}

```

};
