Preloader for external files in mc

I have a movie which has 10 buttons each button loads in an external swf into a container onRelease.

The swf files have a preloader already built in but only works properly offline.

Online it seems to miscalculate the file size of itself and only loads part of itself in.

on second click of button the swf files load in fine…

Any suggestions would be a great help.

This has been wrecking me for 24 hours now…

.http://www.kirupaforum.com/forums/newthread.php?s=&action=newthread&forumid=7#

this is the preloader code which is in the external swf files. taken from Flash mx Bible.

lBytes = _root.getBytesLoaded();
tBytes = _root.getBytesTotal();
percentLoaded = Math.floor((lBytes/tBytes)*100);
loader.bar._xscale = percentLoaded;
loader.percent.text = percentLoaded + "% of " + Math.floor(tBytes/1024) + “K loaded.”;
if (lBytes>=tBytes && tBytes>0) {
if (count>=12) {
gotoAndStop(“main”);
} else {
count++;
gotoAndPlay(“preload”);
}
} else {
gotoAndPlay(“preload”);
}

You’re using _root in external swfs as preloader ? No good. Use lost’s preloader, here.

i am using losts preloader on this project and it works great.

www.mdipi.com/sorry/mainPage.html (second link)

guys this sounds good to me…

Gonna eat my beans on toast(With cheeese).been up for 24 hrs on this *****…

And then check it out…

But sounds good to me…

Cheers *_^

Speak in a mo

sorry guys my brain has crashed…
Eyes on stalks at the mo…

Gonna start a fresh with the losts code tommorrow…

Will keep you posted…

Thanxs again for all the help…

Shallroc *_^

Well got up this morning, nice strong coffee and went through the lost preloader.

One thing WICKED…

Works a brilliantly my headache has now gone, Bosssssss

Thanxs Voetsjoeba and Gigli much respect

Thank lostinbeta :wink:

Thank lostinbeta indeed. respect all round