# Preloader doesn't work on browser refresh?

**URL:** <https://forum.kirupa.com/t/preloader-doesnt-work-on-browser-refresh/231794>\
**Category:** Uncategorized\
**Created:** [July 8, 2007, 5:47am UTC](https://forum.kirupa.com/t/preloader-doesnt-work-on-browser-refresh/231794 "2007-07-08T05:47:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lightscience](https://avatars.discourse-cdn.com/v4/letter/l/a88e57/32.png) [@lightscience](https://forum.kirupa.com/u/lightscience)\
**Post date:** [July 8, 2007, 5:47am UTC](https://forum.kirupa.com/t/preloader-doesnt-work-on-browser-refresh/231794/1 "2007-07-08T05:47:54Z")

</div>

yeah, the subject says it all.

my new preloader works great 🙂 just that when i refresh the browswer it doesn’t load at all… just sits there and does nothing. not very useful really! hahaha 🙂

man would i love some help on this one, if anyone knows…

[COLOR=plum] **here is the site that i’m talking about** [/COLOR]

oh and here’s my preloader code… taken right off of a tutorial :

```auto
//Import the required assets
import flash.display.*;
//Stop the playhead while loading occurs
this.stop();
//Create a listener to call the loading function as the movie loads
this.loaderInfo.addEventListener (ProgressEvent.PROGRESS, PL_LOADING);
/*This is the main function, basically it grabs the total and loaded bytes,
calculates a percentage, and displays it by stretching the bar and adjusting
the textfield display. If your bar/textbox instancenames are NOT lbar/lpc,
you'll need to adjust this code to match your instance names*/
function PL_LOADING(event:ProgressEvent):void {
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;
//Stretch the bar
bar_mc.scaleX=pcent/100;
//Display the % loaded in textfield
amount_dt.text=int(pcent)+"%";
//If the movie is fully loaded, kick to the next frame on the main timeline
//You may wish to change the gotoAndStop(2) to a gotoAndPlay(2)
if(pcent==100){
this.gotoAndStop("splash");
}
}

```

thank you in advance! :tie:
