This content has been marked as final. Show 5 replies
Where are you testing this? Locally, it'll load nearly instant and so you're
not going to see the preloader action. Also, you have Bytes = Bytes + 1 in
your third frame? It's not doing anything, and should be removed - and you
can write it as: Bytes++; - but still it's wrong to have there. I always
suggest people use the MovieClipLoader class instead of LoadMovie. You can
do the preloader calcs in the onLoadInit method then, and you can do this in
one frame instead of three.
Adobe Community Expert
Bytes = Math.round(100*loader.getBytesLoaded()/loader.getBytesTotal());
preloaderbar._xscale = Bytes;
ay! :) thats it! thank you very much guys! especially to Mohammed Fasil A.K :)
well ... :/ ... while testing the Mohammed Fasil A.K script I have found out that it works correctly only with large (data) size files ...
in my case, if the loaded file was less than 30 kB, it did not work . the file has loaded up, that was correct, but the progress bar was not working at all.
my speed connection is pretty fast (DSL), I guess it might be important - the speed of connection together with the size of the file ...
I made another test, I was loading 200 kB file and everything was correct ...
but unfortunally I need to load a file of any size ...
can anyone help?
Of course you won't see the progress bar with a 30K file because it will load so fast you won't have time to see it. It still work, but you only see it when it needs to be seen, which is exactly what you want.