Preloader gets preloaded?!

Hello all,

I’ve tried 5 different preloaders and none of them seem to work correctly. The problem I’m having is that I get a blank screen when the movie is actually preloading. When it’s finished, I get to see a second of the preloader bar and it continues the movie, like if the preloader itself got preloaded.

The first frame(s) are for the preloader only. Then the movie starts with a piece of AS (for music) and the animations.

What am I doing wrong? Any ideas?


Do you use any components or do you have other mc\s that are exported to 1st frame?

If so, do a search on ‘preload export first frame’ and I’m sure you’ll find the info you need :slight_smile:

I use the standard scroll bar as a component, but it’s not in the first frame. Like I said, the first frame(s) are for the preloader only (some preloaders require 1 frame, others 2 or 3 or whatever, depending on how the preloader is made).

My actual movie starts from frame 6 with some AS and no animations. Animations start from frame 8.

Is that what you meant?

this happens to me occasionally, too. In my case, it’s caused by me exporting all my sounds on the first frame of a movie.

I get around it by having a seperate movie that is purely a preloader. This movie then loads the main movie, and voila! the preloader works again.

I’ve seen a few tutorials on this, but I can’t remember where.

ARGH! I’m all confused now. :crazy:

OK, I read some stuff about streaming sound and preloaders. I disabled the option “export on first frame” using the Linkage thingy of my music in the library. I want the music to preload as well though, so, here’s my code:

mySound = new Sound();
bytes_loaded = Math.round(_root.getBytesLoaded() + mySound.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal() + mySound.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {

The result: the bar loads and freezes at 100%. What am I doing wrong now?

No one? Pretty please… :wink:


I`m just baffled as to why you are trying to preload sound which you want to stream.
streaming sounds are preloaded 5 seconds worth by default. If you
need it to preload more than that you have to modify the internal flash
variable _soundbufTime
If you want to preload 10 seconds of sound data instead of 5:

_soundbuftime = 10;

OK, I think I misunderstood a couple of things or/and didn’t make myself clear. It happens when I’m writing in English. :wink: Let me start again:

I have a simple preloader with a %-bar that has to preload a small movie with music. The music doesn’t have to stream really, just play when the AS kicks in, which it did. The sound is “exported for AS” and “exported on first frame”. The problem I have is that the preloader doesn’t show up at the beginning of the movie, while preloading. The screen remains blank for a while until everything is preloaded. That’s not what I want. I want the user to see the preloader bar while waiting for the preloader to preload.

I searched the forum and found some similar problems people were having, with a few differences here and there. Apparently this is a common preloader problem. Anyway, I tried some stuff: I disabled the sound’s “export on first frame”. Without this option, my movie preloads like it has to. I can see the bar and the % and everything. When it hits 100%, the movie begins. There’s a “but” though: the music doesn’t get preloaded anymore.

Once again, the music I have is triggered by ActionScript. I don’t know if that’s the problem or not, but it drives me crazy.

Thank you. :slight_smile:

This last thing you tried,leave it like this,create a dummy frame never seen by your viewers between the preloader and the main movie and drag an instance of the sound into this.

Ah, it works, thank you!! :thumb:

I have a bonus question though. :wink:
The AS that controls the music at the beginning of the movie is in frame 6. I first put the instance of the sound on frame 4, which worked as well, but with the sound being “duplicated” when it played. So I put the instance in a new layer, in a frame just above the frame where the AS does its thing. Works like a charm.
Now my question: do I always have to put it on the same “level” or can I set up the instance so that it doesn’t play by itself?

Not sure i properly understand your “bonus question”. What i do,is-
frame1-preloader code- if(blahblah && blah){
frame 2- sound instance-never visits this frame.

OOPS, don’t answer that last “bonus” question, I found the solution. Sometimes I don’t see stuff that are just in front of my eyes. Must be the warm weather.

Anyway, thanks again!! :slight_smile:

EDIT: I was too late, you answered it anyway. :wink: I just put the instance on “stop” so that it didn’t play by itself.

Kajinku, you might want to do that code onEnterFrame to UPDATE IT as the sound is loaded…