Home | Web Design | App / Game development | Flash | Flash Games | Graphic Illustration | Technical Illustration | Contact | Site Map    Twitter
  Galaxy Graphics Limited

Technical InformationCommon SWF questions: Preloader goes backwards to minus infinity and game/application does not load.


Your Flash game/application is up on your website but the preloader does not work. In fact it looks like it's running backwards to minus infinity, and so never "completes" and loads the application/game.


The web server is gzipping the swf files as it serves them. This means the preloader cannot get accurate knowledge of the real size of the swf file, and this confuses it a lot. It tries to divide by zero, giving infintiy.


The best solution is to turn off gzipping of SWF files on your server.

The alternative solution is to alter the code of the preloader, though this is something of a workaround, and it just tells Flash that in the event of a division by zero, to just proceed as if everything was already loaded, even if it wasn't yet. However in the days of common 10MB+ connections, and with the games and applications created by Galaxy Graphics being very light in terms of file size, this is an OK workaround, although the "no gzipping" solution above is preferred.

In this instance, locate this line of code in the preloader:-

if (total == loaded ){

and change it to this:

if (total == loaded || loaded > total || (loaded/total > 100)){

Site content Copyright © 2001-2014 Galaxy Graphics Limited. | Privacy Policy | Terms of use