# Preloader actionscript help!

**URL:** <https://forum.kirupa.com/t/preloader-actionscript-help/67710>\
**Category:** flash\
**Created:** [October 19, 2004, 12:22am UTC](https://forum.kirupa.com/t/preloader-actionscript-help/67710 "2004-10-19T00:22:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karma](https://avatars.discourse-cdn.com/v4/letter/k/bcef8e/32.png) [@karma](https://forum.kirupa.com/u/karma)\
**Post date:** [October 19, 2004, 12:22am UTC](https://forum.kirupa.com/t/preloader-actionscript-help/67710/1 "2004-10-19T00:22:39Z")

</div>

Hi there ! a kind friend of mine put in a loading bar for me, but it isnt working for me… i.e the bar just stays solid and it doesnt move from left to right when loading! (but the page loads correctly etc.) I was wondering if someone could have a look at this script for me and tell me if you can spot what is wrong?

MUch appreciated!!

**Frame 1**

setProperty(“pBar”, \_xscale, 0);

**Frame 2**

// un-comment the lines 3 to 5 below, to calculate the actual file size  
// remember to COMMENT frame 3 line 3 if your going to use below  
iBytesTotal = \_root.getBytesTotal();  
iBytesLoaded = \_root.getBytesLoaded();  
iBytes = (iBytesLoaded/iBytesTotal)\*100;  
if (iBytesLoaded == iBytestotal) {  
gotoAndPlay(“Scene 1”, 1);  
}  
setProperty(“pBar”, \_xscale, iBytes);  
sStatus = “LOADING”;

**Frame 3**

if (iBytes\<100) {  
// Comment line 3 below if your using the iBytesTotal and iBytesLoaded in frame 2 line 3 to 5  
// iBytes=iBytes+2;  
gotoAndPlay(2);  
} else {  
sStatus = “COMPLETE”;  
gotoAndPlay(“Scene 1”, 1);  
}

**Frame 4**

// Load your next action below, ie play or something  
sStatus = “COMPLETE”;  
play()

Thanks in advance!
