-
1. Re: loader to reach 100% after loading several SWFs?
esdebon May 24, 2012 8:31 AM (in response to Ron Colmen)You need a variable that is the sum of the total bytes of all your SWF and one that has the count of bytes loaded for use in instead of lBytes and Tbytes -
2. Re: loader to reach 100% after loading several SWFs?
Ned Murphy May 24, 2012 8:29 AM (in response to Ron Colmen)One approach would be to make the bar width total change 25% for each file.
-
3. Re: loader to reach 100% after loading several SWFs?
Ron Colmen May 24, 2012 10:40 AM (in response to esdebon)You need a variable that is the sum of the total bytes of all your SWF and one that has the count of bytes loaded for use in instead of lBytes and Tbytes
Thanks. How do I get the total count?
One approach would be to make the bar width total change 25% for each file.
Thanks Ned. But the bar would still be _visible=false; 4 times?
-
4. Re: loader to reach 100% after loading several SWFs?
esdebon May 24, 2012 11:50 AM (in response to Ron Colmen)bytes_loaded=Math.round(loaderA.getBytesLoaded()+loaderB.getBytesLoaded()+loaderC.getBytes Loaded()+loaderD.getBytesLoaded());
bytes_total=Math.round(loaderA.getBytesTotal()+loaderB.getBytesTotal()+loaderC.getBytesTot al()+loaderD.getBytesTotal());
-
5. Re: loader to reach 100% after loading several SWFs?
Ned Murphy May 24, 2012 12:26 PM (in response to Ron Colmen)Only if you make it be invisible 4 times. I wouldn't.
-
6. Re: loader to reach 100% after loading several SWFs?
Ron Colmen May 24, 2012 1:30 PM (in response to esdebon)bytes_loaded=Math.round(loaderA.getBytesLoaded()+loaderB.getBytesLoade d()+loaderC.getBytesLoaded()+loaderD.getBytesLoaded());
bytes_total=Math.round(loaderA.getBytesTotal()+loaderB.getBytesTotal() +loaderC.getBytesTotal()+loaderD.getBytesTotal());
Thanks.
loaderA, loaderB, etc... do I have to define those or something?
-
7. Re: loader to reach 100% after loading several SWFs?
Ron Colmen May 24, 2012 1:30 PM (in response to Ned Murphy)Only if you make it be invisible 4 times. I wouldn't.
could you please show how?
-
8. Re: loader to reach 100% after loading several SWFs?
Ned Murphy May 24, 2012 1:45 PM (in response to Ron Colmen)Just move the lines that make it invisible outside of any function so that it is only invisible at the start. As soon as it is made visible the first time it will stay visible.
-
9. Re: loader to reach 100% after loading several SWFs?
Ron Colmen May 24, 2012 2:26 PM (in response to Ned Murphy)Thanks Ned.
But what when all complete loading... how can I make it invisible then?
-
10. Re: loader to reach 100% after loading several SWFs?
esdebon May 24, 2012 2:36 PM (in response to Ron Colmen)You can add a counter
var counter:int=0;
prototypeLO.onLoadProgress = function(targetMC2, lBytes, tBytes) {
_root.loaderBar2._width = (lBytes/tBytes)*100;
_root.percentDisplayZ.text = "% "+Math.round((lBytes/tBytes)*100);
if(++counter>=4){
_root.loaderBar2._visible = false;
_root.borderX2._visible = false;
_root.loaderBack2._visible = false;
}
};
-
11. Re: loader to reach 100% after loading several SWFs?
Ron Colmen May 24, 2012 3:35 PM (in response to esdebon)Yep! that is nice.
but what about the _root.loaderBar2? How can I make this look progressing?
Not working:
var bytes_loaded=Math.round(_root.main1_mc.getBytesLoaded()+_root.main2_mc.getBytesLoaded()+_root.main3_mc.getBytesLoaded()+_root.main4_mc.getBytesLoaded());
var bytes_total=Math.round(_root.main1_mc.getBytesTotal()+_root.main2_mc.getBytesTotal() +_root.main3_mc.getBytesTotal()+_root.main4_mc.getBytesTotal());
prototypeLO.onLoadProgress = function(targetMC2, lBytes, tBytes) {
_root.loaderBar2._width = (bytes_loaded/bytes_total)*100;




