# \[MX04\]Simple preloaders shows up after 50%

**URL:** https://forum.kirupa.com/t/mx04-simple-preloaders-shows-up-after-50/69105
**Category:** flash
**Created:** [November 1, 2004, 4:18pm UTC](https://forum.kirupa.com/t/mx04-simple-preloaders-shows-up-after-50/69105 "2004-11-01T16:18:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Rasper](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@Rasper](https://forum.kirupa.com/u/Rasper)
#### Post date: [November 1, 2004, 4:18pm UTC](https://forum.kirupa.com/t/mx04-simple-preloaders-shows-up-after-50/69105/1 "2004-11-01T16:18:56Z")

</div>

Hi there,

I’m using a simpel preloader script that holds the movie on frame 1, and plays frame 2 when everything is loaded.  
I used this script before without any problems, but for some reason the textfield with the “loading”-text only shows up at exactly 50% :-/

There are no other objects/movieclips/textfieds except this one “loading”-text on frame 1. When I trace the ‘update()’-function, it traces once at the beginning of the script, holds, and than traces as it should after 50%…

Here’s my code at frame 1:

```auto
stop();
preloaden();
function preloaden(){
	preloadingInterval = setInterval(update, 1);
}
function update(){
	trace("update()-function");
	if(getBytesLoaded() < getBytesTotal()){
	 percentageLoaded = Math.round((getBytesLoaded() / getBytesTotal() * 100) + 1)
	 txt_loading.text = percentageLoaded + "%";
	 trace(percentageLoaded);
	} else {
	 clearInterval(preloadingInterval);
	 gotoAndPlay("loaded");
	}
} 

```
