Problem with preloader on the web

3

I've developed a project where I need to show the user that the file itself is loading. The project has two scenes: In the first scene I created a preloader with the code:

stop();

this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, carregando);
this.loaderInfo.addEventListener(Event.COMPLETE, carregou);

function carregando(e:ProgressEvent):void {
    preloader_txt.text = "CARREGANDO: "+int((this.stage.loaderInfo.bytesLoaded/this.stage.loaderInfo.bytesTotal)*100)+"%";  
}

function carregou(e:Event):void {
    play();
}

In the second scene is the entire contents of my file SWF .

I configured all my classes to be imported into Frame 2 of my application, so frame 1 would only be responsible for loading the file.

When I test the local machine, everything happens successfully, I see my file being loaded and the percentage is displayed on the screen.

But when I upload to my server on the internet and load it, the preloader appears only at 100%, ie when the flash is fully loaded.

I've tried different browsers, and yet the problem occurs.

    
asked by anonymous 27.02.2014 / 18:43

1 answer

0

I was able to solve the problem! The problem was in the compression mode the server performed in the SWF, switching to GZIP mode, when in fact it should use DEFLATE.

The answer I got from SOEN at this link: link

    
28.02.2014 / 16:53