# Very Annoying (Yet Simple?) Preloader Problem!

**URL:** <https://forum.kirupa.com/t/very-annoying-yet-simple-preloader-problem/18751>\
**Category:** flash\
**Created:** [April 20, 2003, 4:53pm UTC](https://forum.kirupa.com/t/very-annoying-yet-simple-preloader-problem/18751 "2003-04-20T16:53:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RageW0lf](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@RageW0lf](https://forum.kirupa.com/u/RageW0lf)\
**Post date:** [April 20, 2003, 4:53pm UTC](https://forum.kirupa.com/t/very-annoying-yet-simple-preloader-problem/18751/1 "2003-04-20T16:53:51Z")

</div>

Ok I have posted this on Actionscript also, but I really need a quick answer if possible and more people tend to look here…

I am loading different submovies into a movie clip symbol on my main movie timeline, and am using an “OnClipEvent” action to find out how much is loaded etc.  
To do this I have attached the following script to the movie clip symbol the sub movie is loading into. The instance of this movieclip symbol is called “BGtarget”:

```auto

onClipEvent (enterFrame) {
    percent = int(this.getBytesLoaded()/this.getBytesTotal()*100);
    _root.shutters.outputfield = percent+"%";
    _root.shutters.loader._yscale = percent;
}

}

```

I have another movie clip symbol on my main timeline called “shutters” which is basically my loading sequence. It shows the percentage loaded, and has a vertical loading bar which scales up.

On frame 31 of “shutters” I have the following code:

```auto

if (_root.BGtarget.percent>99.9) {
    gotoAndPlay(32);
}
stop();
if (_root.BGtarget.percent>99.9) {
	gotoAndPlay(32);
}

```

if you are wondering why I have the same command before and after the “stop();” it was just too ensure no stupid syntax error (eg. tell it to go to 32, but then tell it to stop so it doesn’t go to 32) - its not important, it should work anyway.

I want it to go and play frame 32 of “shutters” when loading is complete.

What it does:

scales the bar fine  
increases percentage fine.  
However it gets to 100% then stops. Nothing happens after that, it fails to goto frame 32 and play it?  
WHY IS THIS!??!

It works fine offline, just online it wants to do this for some unknown reason, please help!

---

<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:** [April 20, 2003, 5:01pm UTC](https://forum.kirupa.com/t/very-annoying-yet-simple-preloader-problem/18751/2 "2003-04-20T17:01:29Z")

</div>

is there any way i could see your file? you can e-mail me at \*\*\*\*\*\*\*\* I removed my e-mail. wasn’t needed anymore.  
I can understand it better.

---

<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:** [April 20, 2003, 5:41pm UTC](https://forum.kirupa.com/t/very-annoying-yet-simple-preloader-problem/18751/3 "2003-04-20T17:41:26Z")

</div>

nevermind I gotta bounce. I will be back in about 9 hours.

---

<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:** [April 20, 2003, 6:20pm UTC](https://forum.kirupa.com/t/very-annoying-yet-simple-preloader-problem/18751/4 "2003-04-20T18:20:55Z")

</div>

Ok sent to your email as its too big for here.

The movies that are loading in are different backgrounds.  
A friend checked the link out and he says that the first background loaded in fine for him but when he went to change background it got stuck at 100%, until he clicked the button to change it and then it loading in fine - still a problem.

For me its gets stuck on loading the first background in and everyone after that first time.

link is

[http://www.Innovati0n.com/v0/Interface.swf](http://www.Innovati0n.com/v0/Interface.swf)

when it gets stuck you can use “play” to continue through the movie. The only other background working is “eagle building”.

---

<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:** [April 20, 2003, 10:56pm UTC](https://forum.kirupa.com/t/very-annoying-yet-simple-preloader-problem/18751/5 "2003-04-20T22:56:45Z")

</div>

i think that its not working because you don’t have a loop there. Try this… in frame 32 of shutters put this code:

```auto

gotoAndPlay(_currentFrame - 1)

```

and then change the numbers in frame 31 to tell it to go to frame 33. That should work. then you can adjust your frames after that.

The problem is: There is no loop. Once your frame is played, it stops checking the if statement because it isn’t called again. Remove the stop() and do what i said above and it should work.

---

<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:** [April 20, 2003, 11:36pm UTC](https://forum.kirupa.com/t/very-annoying-yet-simple-preloader-problem/18751/6 "2003-04-20T23:36:25Z")

</div>

Yep, its work thanks alot! 🙂

I thought initially the looping needed would be provided by the onclip event enterframe action, I even tried something similar to the solution at one point I must have enterred something wrong cause even then it didn’t work ☹

Looking through somebody elses .Fla is often very difficult and time consuming (I know from experience) especially if its this kind of problem, I really appreciate it!

Thanks Jubba.
