I can't get my preloader to work!

It just runs as if the action wasn’t there, which makes it kinda slow when it’s a video clip downloading on a 56k modem!!!

Anyone know what actions I should be using in MX?

The same as in Flash 5 I guess. If you don’t know how to do that, there’s a post on the Best of Kirupa forum.

pom 0]

Make your preloader 3 frames long and on its own scene, make a dynamic text field with the instance named ‘percentValue’ on your _root, and use the code supplied below and make FRAME 1 empty!


loadedkbytes=Math.ceil (loadedbytes/1000);
percentValue = int(loadedbytes/(totalbytes/100)) + “%”;
if (loadedbytes == totalbytes) {
nextScene ();



if (loadedbytes == totalbytes && * loadedbytes!=0*) {

why is that needed?

If a processor is particularly fast, as many of the new ones are, the movie will often read as 0k total upon the first clock ticks. I’ve had my comp bipass the preloader for that reason, apparently. Since I’ve added that segment I’ve never had a problem viewing movies on my overclocked PIII, or the G4. Both the machines exibited problems before that point in time, and still do on some movies we find online.
I Supra gave me that one, so you know it’s good stuff.

thats upuaut…ill have to put this note on one of those yellow sticky pads and put it on my monitor!

one part I dont understand the part of the dynamic field with instance name ‘percentValue’ on the _root.
what exactly do you mean by dynamic field?

somehow I misread… disregard the dynamic field question. When I printed the post, it did not catch ‘text’ before dynamic field.

However… when I try this in MX, it never plays the preloader, plus it says instance name is not supported by Flash 5.

I used Debug on 14.4 and still cant see my preloader.

Do you have an instance of a movie clip with an instance name, located at that point in the timeline? What is the name of that instance?

Here’s the fla… laughable? Yes. However, first stab at it. :slight_smile:

Can you please tell me what Im doing wrong?


thank you very much.

did anyone have the fix for my preloader?


cant wait to finish this project, but preloader just skips and main animation (scene 1) wont even play

your suggestions will be greatly appreciated.

I noticed a couple of problems… for one thing it looks like you’ve got a preloader in scene 2 as well as scene 1. I don’t really see the point. By the time the play head leaves scene 1, you’ve already checked to see if all bytes are loaded so checking if all the frames are loaded wont be very useful, (as a second note to this, _framesLoaded, and _framesTotal have been depreciated and you should probebly only be using the bytes methods now.)

Now I’m really not sure what the heck is up with this, and I’m running it on MX not Flash 5.0, but when I test the movie, it opens a movie in Flash… it opens an FLA!! Now I really don’t know how it can accomplish that… I’m still exploring that problem.

For now, I have these suggestions

A) get that action script out of scene 2 that talks about framesloaded.

B) a/s works really well with line breaks and indentations, plus it makes it easier for people to read when you’re looking for help. Try breaking your code down into lines that are a little more reminiscent of the “basic” action scripting mode. This will not only help us, but it will help you when you need to debug something.

C) DO NOT PUT ACTION SCRIPT ON A LAYER WITH OTHER OBJECTS. This is not a specific rule, but it’s something that I personaly can’t stand. extra layers add nothing to the swf file size and they make sure that when you’re looking for action script to debug, it’s all in the same location.

Most of these wont help specificaly with your problem, but you’re problem is a little complex at this point… at least these suggestions will help you to debug in the future. :slight_smile: