I've occasionally seen my getBytesTotal script get fired at just the
right time when the file header info hasn't quite been read in yet and
it thinks that the getBytesTotal and getBytesLoaded are both 10.
So I usually have loaded.getBytesLoaded() == loaded.getBytesTotal() &&
loaded.getBytesTotal >100
Muzak wrote:
Is it safe to assume that as soon as
loaded.getBytesLoaded() == loaded.getBytesTotal()
actions in first frame of the loaded 'loaded' movieclip
were executed ?
calculate and use percentage:
var l:Number = loaded.getBytesLoaded();
var t:Number = loaded.getBytesTotal();
var p:Number = Math.floor((l/t)*100);
if(p == 100) {
// loading is done
// but loaded clip might not be ready yet
}
Best is to use MovieClipLoader and its onLoadInit event though.
http://livedocs.adobe.com/flash/9.0/main/00002001.html
regards,
Muzak
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders