# Preloader bug - easing preloader

**URL:** <https://forum.kirupa.com/t/preloader-bug-easing-preloader/165739>\
**Category:** flash\
**Created:** [October 13, 2005, 4:43pm UTC](https://forum.kirupa.com/t/preloader-bug-easing-preloader/165739 "2005-10-13T16:43:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rickface](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@rickface](https://forum.kirupa.com/u/rickface)\
**Post date:** [October 13, 2005, 4:43pm UTC](https://forum.kirupa.com/t/preloader-bug-easing-preloader/165739/1 "2005-10-13T16:43:28Z")

</div>

Hello all,

Im having some weird buggy issues with my preloader and was wondering if anyone can take a look to see if you can see anything that may be causing this :?

The bug is sort of hard to explain. The loader works most of the time, but when someone double clicks on a link to load a section, the loader seems to get stuck in a loop - like i didnt put a stop frame at the end of the timeline :?  
I get the same bug when I test the movie in flash and simulate the download at cable modem speeds, but I dont seem to get it at 56k simulated speeds.

Im baffled - can anyone think of what this could be?

the code is as follows:

```auto

function preLoader(bar:MovieClip,targetClip:MovieClip){
	var loaded:Number = targetClip.getBytesLoaded();
	var total:Number = targetClip.getBytesTotal();
	var percent:Number = loaded/total;
	var dummy:Number = Stage.height*percent;
	bar._height += (dummy-bar._height)/4;
	if(bar._height>=Stage.height-1){
		clearInterval(preloaderInt);
		targetClip.play();
	}
	updateAfterEvent();
}

preloaderInt = setInterval(preLoader,40, loaderBar, _parent);

```

Thanks a million in advance!

JTK
