Error loading *.swf compiled from Flex

When i load a swf made by Flex 2.0 in my code (which is made with AS 3.0 *.as classes and compiled with mxmlc.exe) - the rendering of the swf is highly unstable in Firefox.

The .swf file does load, and no errors is thrown as far as i can see at runtime when i addChild the loaded swf. When checking ProgressEvent.PROGRESS, i see the file getting loaded.

I can see the loaded swf-file visually in my Firefox-browser about 1/4 of the times i refresh the page. (I clear cache every time).

If i load a jpg-picture or a swf-file published from Flash 9 Public Alpha, (even Flash 8) everything works as a charm.

My Flashplayer is 9,0,16,0 for both IE and Firefox.

Anyone have the slightest idea about what can cause this problem? I have tried to turn on and off all imaginable settings inside Flex publishing settings, but nothing seems to help, and im renderd puzzled by the randomness of this error.

How long have you had Flex installed, and has this been happening the entire time?

Well, its first time i have tried to load Flexcompiled swf’s today. Flex has been installed… i dont know exactly, a month or something.

[Edit]
I have also tested with the new beta update of flashplayer 9, and still have the same problem.

I wonder if anyone of you out there are able to reproduce the bug or error. Also, if its not bugged, post the code here. Im not posting my code here in fear of misguiding ppl to possibly write the same error that i do :stuck_out_tongue:

I use the flash.display.Loader

I have done a fairly important discovery. It looks like that the Flex-compiled swf gives wrong bytesTotal.

adding eventlistener Event.INIT which will output:


trace("Loaded")

adding eventlistener ProgressEvent.PROGRESS which will output from:


trace(event.bytesLoaded+" - "+event.bytesTotal)

Outputs:


0 - 3982
3982 - 3982
Loaded
3982 - 8091
8091 - 12465
12073 - 12465
12073 - 12465
12465 - 12465
12465 - 16187

(... all the way up to ...)

128484 - 128484


which is the real filesize-

As you can see, the file is read as loaded before it actually is loaded, and COMPLETE and INIT events are fired too fast…

:puzzle:

So… now what…