Merge branch 'master' into snapshotserver
[potlatch2.git] / net / systemeD / potlatch2 / PreloaderDisplayBase.as
index c8c0e808179bd817cb53a259bd4d65567a2a5168..aa93e94517e99e5bb21ca579ebbdef0e16a6d68c 100644 (file)
@@ -97,6 +97,11 @@ package net.systemeD.potlatch2
         {
             _bytesLoaded = event.bytesLoaded;
             _bytesExpected = event.bytesTotal;
+
+            // Some browsers got nuts when the swf is served with gzip encoding and report bytesTotal as zero
+            if(_bytesExpected == 0) {
+                _bytesExpected = _bytesLoaded; // This is how Firefox behaves anyway in such cases
+            }
             _fractionLoaded = Number(_bytesLoaded) / Number(_bytesExpected);
 
             draw();