views:

242

answers:

1

Hi,

I have created a Flex custom preloader, exactly like it is done in this example: http://www.gotoandlearn.com/play?id=108

Now when I implement this, is seems to work fine on my computer in FireFox and Chrome. I publish it on the server, refresh my cache and reload the application and I do get my customized preloader.

But on a friend's computer, the screen stays white for a while, and then for a second or so it shows the preloader, but the indicator is at 100%.

So the loading already happened before it showed the preloader. Anyone seen this before and do you know what causes that or how to solve it?

Thanks

+1  A: 

There is a problem in IE with a Flex Custom Preloader.

See: http://jaapkooiker.nl/blog/2008/02/15/flex-custom-preloader-ie-stagewidth-stageheight-problem-fixed/

To solve this IE problem a resize eventListener has to be declared in the set preloader method. Then a modification in the centerPreloader has to be made.

Replace:

x = (stageWidth / 2) - (clip.width / 2);
y = (stageHeight / 2) - (clip.height / 2);

With:

x = (stage.stageWidth / 2) - (clip.width / 2);
y = (stage.stageHeight / 2) - (clip.height / 2);
Todd Moses
Thanks a lot! that worked. The only thing now was that whenever I resized the window after the app had completed loading, i got an actionscript error that stage was null. so surrounded the two statements above with an "if (stage)"
Mad Oxyn