无限preloaderpreloader

由网友(倾情天涯)分享简介:我在preloader一个问题。而DONOT知道怎么纠正它。 I have a issue in preloader. And donot know how to correct it. 问题是什么。 preloader正显示出无限大,而使用Chrome浏览器。我看到一些解决方案,如gzip压缩的COM press...

我在preloader一个问题。而DONOT知道怎么纠正它。

I have a issue in preloader. And donot know how to correct it.

问题是什么。 preloader正显示出无限大,而使用Chrome浏览器。我看到一些解决方案,如gzip压缩的COM pression服务器。

Problem is. Preloader is showing infinity while using Chrome. I saw some solutions like gZip Compression in server.

我想知道,从闪存侧任何其他解决方案。因为我开发游戏,我们可以在任何地方播放。

I want to know any other solution from flash side. because i'm developing game and we can play it anywhere.

我要解决一个早日。有人帮我做的。

I want the solution a soon as possible. Someone help me to do it.

推荐答案

您可能偶尔会无限在这些计算则bytesTotal没有被正确填充时。

You may occasionally get infinity in these calculations when the bytesTotal has not been correctly populated.

这是很好的做法,像做

var loadper:Number = 0;
if (this.loaderInfo.bytesTotal >= 0) 
{
    loadper = Math.round((this.loaderInfo.bytesLoaded/this.loaderInfo.bytesTotal)*100);
}
...

有很多原因,你可能会得到0字节返回总,但通常它必须与您从您的服务器传送文件的方式。

There are many reasons you could be getting 0 bytes returned as the total but usually it has to do with the way you are delivering files from your server.

阅读全文

相关推荐

最新文章