# Continuous loop

**URL:** <https://forum.kirupa.com/t/continuous-loop/9773>\
**Category:** Uncategorized\
**Created:** [December 18, 2002, 9:35am UTC](https://forum.kirupa.com/t/continuous-loop/9773 "2002-12-18T09:35:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimw00d](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jimw00d](https://forum.kirupa.com/u/jimw00d)\
**Post date:** [December 18, 2002, 9:35am UTC](https://forum.kirupa.com/t/continuous-loop/9773/1 "2002-12-18T09:35:43Z")

</div>

I have posted this question recently and I am desperate for a solution. I have a pre-loader which is causing a continuous loop. I am very much a novice and the script was from a third party.

On frame 1, I have:

totalK = getBytesTotal()/1000;  
loadedK = getBytesLoaded()/1000;  
remainingK = totalK-loadedK;  
percentageK = (loadedK/totalK)\*100;  
setProperty(“bar”, \_xscale, percentageK);  
if (loadedK\>=totalK && totalK != 0) {  
gotoAndPlay(3);  
}

on Frame 2:

gotoAndPlay(1);

I believe the script in frame 2 is causing the loop. If I placed an else script in frame 1 and removed the script from frame 2 would this help?

For example if:

(loadedK\>=totalK && totalK != 0) {  
gotoAndPlay(3);  
}

else

totalK = getBytesTotal()/1000;  
loadedK = getBytesLoaded()/1000;  
remainingK = totalK-loadedK;  
percentageK = (loadedK/totalK)\*100;  
setProperty(“bar”, \_xscale, percentageK);  
if (loadedK\>=totalK && totalK != 0) {  
gotoAndPlay(3);  
}

Cheers\<:}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 18, 2002, 11:44am UTC](https://forum.kirupa.com/t/continuous-loop/9773/2 "2002-12-18T11:44:39Z")

</div>

I,

U are doing it the way it used to be done in Flash 4.  
I’m posting a fla for u to have a look.(AH! and does the preloading [this is a Flash 5 version but it’ll work in MX. the only difference is that in this example the enterframe it’s called on the MC itself .In MX u would call it from the timeline)

Cheers

SHO
