# Loader doesn’t work when refresh

**URL:** <https://forum.kirupa.com/t/loader-doesn-t-work-when-refresh/268208>\
**Category:** flash\
**Created:** [August 11, 2008, 1:06pm UTC](https://forum.kirupa.com/t/loader-doesn-t-work-when-refresh/268208 "2008-08-11T13:06:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fs\_tigre](https://avatars.discourse-cdn.com/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://forum.kirupa.com/u/fs_tigre)\
**Post date:** [August 11, 2008, 1:06pm UTC](https://forum.kirupa.com/t/loader-doesn-t-work-when-refresh/268208/1 "2008-08-11T13:06:00Z")

</div>

[FONT=Calibri][SIZE=3]I’m currently using a loader that I found in this forum, it works great except when the browser is refreshed or your hit the back button it just sits there and it doesn’t let you see the content.[/SIZE][/FONT]

[FONT=Calibri][SIZE=3]Here is the code:[/SIZE][/FONT]

[FONT=Calibri][SIZE=3]this.stop();[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]this.loaderInfo.addEventListener (ProgressEvent.PROGRESS, PL\_LOADING);[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]function PL\_LOADING(event:rogressEvent):void [/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]{[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]var pcent:Number=event.bytesLoaded/event.bytesTotal\*100;[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]bar\_mc.scaleX=pcent/100;[/SIZE][/FONT]

[FONT=Calibri][SIZE=3]textBox.text=int(pcent)+"%";[/SIZE][/FONT]

[FONT=Calibri][SIZE=3]if(pcent==100){[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]this.gotoAndStop(2);[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]}[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]}[/SIZE][/FONT]

[FONT=Calibri][SIZE=3]As always, thank you very much.[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]fs\_tigre[/SIZE][/FONT]
