Flash MX Pre-loader

Need help with a pre-loader. The entire movie downloads before the pre-loader starts. Making it pointless to have a preloader. My site is www.cleoandczar.tk If you know how to help I could send you the .fla


Your preloader worked fine on my end. You probably have the flash file in your cache (because you have loaded the page at least once)- enabling your page to load quick enough not to need the preloader. Very nice site. I love the star burst effect- is that script available?

Thanks for the compliment. I took a look at you site and it starts the preloader right away. Very Nice. Mine, I have to tell friends to wait 2min on a plain blue screen until the pre-loader loads. I tried to contact you from your site to send you my .fla source we will see if you can get an 8MB file


No email yet. 8 MB should not be a problem. Try zippping just in case.

You are right. I cleared my cache and I get a blue screen first. I must have missed it the first time.


I sent the .fla to you again let me know if you got it


Check it out now I think I fixed the problem I set my first sceen to start and set the first part of the intro to loop untill the whole movie is downloaded

www.CleoAndCzar.tk :slight_smile:

Oh man Cleo! I have been having the exact same problem, as has david! My screen doesn’t show anything until the movie is like 70% loaded! What the heck is going on with mine? And what did you do to fix this? I don’t understand what this means:

Check it out now I think I fixed the problem I set my first sceen to start and set the first part of the intro to loop untill the whole movie is downloaded

It would be great if you could help me out as this is the last thing I need to fix before someoneleet.com goes online!


try this code

if (!zInit) {
createEmptyMovieClip(“mcBorders”, 2);
createEmptyMovieClip(“mcProgress”, 1);
mcBorders.lineStyle(2, 0x0000ff, 100);
mcBorders.moveTo(25, 180);
mcBorders.lineTo(25, 220);
mcBorders.moveTo(525, 180);
mcBorders.lineTo(525, 220);
mcBorders.zInit = true;
_root.nPercentLoaded = (_root.getBytesLoaded()/_root.getBytesTotal())100;
_root.nXround = (Math.ceil(nPercentLoaded/20))20;
mcProgress.moveTo(25, 190);
5)+25, 190);
5)+25, 210);
mcProgress.lineTo(25, 210);
if (_root.nPercentLoaded<100) {
} else {

this is set up for normal stage size create a new layer and insert 2 keyframes in that layer b4 the movie starts on the oter layer but the code on the second frame
it has a loading bar nothing special but it works


Thank you very much for your reply novatake. However, my first choice is to continue with my preloader and fix it, as Cleo did. I already have some code and also animations for my loading scene. However, if I can not fix it then I will end up using yours.


dont mention it mate A lad posted that on kirupacant remember who though i use that if im makin a big full size 1 but if i make a little 1 i make my own

  1. Select all of the frames in your Pre-load scene.
  2. In your properties switch your Sync selector to Start
  3. Apply an action script to one of your frames in your in your preloader similar to this

line 1 stop();
line 2 var loaded=false;
line 3 ifFrameLoaded (“main”, 17){
line 4 var loaded=true;
line 5 gotoAndPlay(28);
line 6 }
line 7 if(loaded==false){
line 8 gotoAndPlay(1);
line 9 }

line 1 I stop the movie to evaluate my script

line 2 I set a variable

line 3 I check to see if my last frame is loaded in my main frame

line 4 if 3 was true set variable

line 5 I play the next frame in the current sceen

line 6 & 7 if the variable I set was not changed I play my pre-load sceen again


Hey thanks Cleo, a couple of questions.

  1. Does it matter which frame I place this actionscript in?

  2. In line 3, where you designate the last frame in your main movie, I can replace this with my Scene1, which is my main movie scene, and then the last frame in Scene1, correct?

  3. In line 4, you go to the last line in the preloader, where it then goes to the main movie, correct?

Thank you very much for your help cleo! I appreciate it very much!


Sorry cleo nevermind about those questions. OK all I figured out how to do it and I added the AS to a frame. However, it still didn’t work for me. Everytime the loader and the background shows up when the movie is 72% loaded. I thought about why it wasn’t working and realized I load with totalK and not framesLoaded. So, trying to think along the same lines as you did, I entered these lines of AS instead of the others:

if ((getBytesLoaded()/1024)>=(getBytesTotal()/1024) && (getBytesTotal()/1024) != 0) {
} else {

However, this got me nowhere as well. I am wondering if someone could take a look at my .fla and see what they can come up with. I am really struggling with this.


Hey, just trying to help you all out I will paste what I have for the preloader. In my first frame, this is the code I have:

totalK = Math.floor(getBytesTotal()/1024);
loadedK = Math.floor(getBytesLoaded()/1024);
remainingK = totalK-loadedK;
percentageK = Math.floor((loadedK/totalK)*100)+"%";
if ((getBytesLoaded()/1024)>=(getBytesTotal()/1024) && (getBytesTotal()/1024) != 0) {

And in the second frame this is what I have:


Hope this helps.

BTW: The AS that takes the user to the main scene is at frame 16. This is because I have some animations that take place after the loading is complete.

**Can you post your site address, so we can all take a look.:slight_smile: **

No problem. However, it loads kinda fast on a broadband connection so you might not be able to see it. I posted it temporarily here:

Bad Loader


HOLY ■■■■

Do you work for that company that you have listed in your site
I have never seen anything like that before.
Even with all of my skills as a programmer
Graphics Design
and now A little Flash
I feel like I know nothing now:frowning:

No it is not his site…but I am sure Ben wished it was!

LOL my name is Brad, and yes I do wish WhosWe was my site. But can anyone help me with my preloader?