That timeout isnt excactly bulletproof, but what the heck, fixing this bug
never leads to a proper solution ;)

Mine would be having a minimum height for the site(lets say 800) and a
minimum width(lets say 600) and
whenever dimensions goes under that, it automatically assumes a width of 800
and a height of 600, because
most sites or banners(? never build one, but who knows)  have a certain
minimum which it wont function when going under that.

so in psuedo code

var newWidth:Number=(stage.stageWidth>800)?stage.stageWidth:800;

object.position=newWidth-object.width;

this fixes that zero'ing bug of IE and at the same time fixes the fact when
people resize the window to a width of say
100 and the site doesnt function anymore.

On Thu, Apr 8, 2010 at 7:04 PM, Mattheis, Erik (MIN - WSW) <
ematth...@webershandwick.com> wrote:

> Seem to have found a fix -
>
> I placed all my code that relies on stage.stageWidth and stageHeight in a
> function positionElements and delayed the invocation of it:
>
> setTimeout(positionElements,1);
>
> _ _ _
> Erik Mattheis
> Senior Web Developer
> Minneapolis
> T  952 346 6610
> C 612 377 2272
>
> Weber Shandwick
> Advocacy starts here.
>
> PRWeek Global Agency Report Card 2009 - Gold Medal Winner
> The Holmes Report Global Agency of the Year
> PR News Agency of the Year
>
> -----Original Message-----
> From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
> flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, Erik
> (MIN - WSW)
> Sent: Thursday, April 08, 2010 10:03 AM
> To: Flash Coders List
> Subject: [Flashcoders] IE7 reload stageWidth bug
>
> I'm up against the bug discussed here:
> http://code.google.com/p/swfobject/issues/detail?id=3 - on page reload,
> IE7 returns 0 for stage.stageWidth and stage.stageHeight.
>
> As a quick fix, I hardcoded stageWidth and stageHeight, but I need a
> solution that will allow the movie to figure things out on its own as it's
> meant to be embedded by others at any size they want.
>
> How have others dealt with this?
>
> _ _ _
> Erik Mattheis
> Senior Web Developer
> Minneapolis
> T  952 346 6610
> C 612 377 2272
>
> Weber Shandwick
> Advocacy starts here.
>
> PRWeek Global Agency Report Card 2009 - Gold Medal Winner
> The Holmes Report Global Agency of the Year
> PR News Agency of the Year
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Meinte van't Kruis

Freelance Flash Platform Dev (mxml,actionscript,flex,air)

malatze
http://www.malatze.com/
http://blog.malatze.com/
http://www.linkedin.com/in/meinte
mei...@malatze.com
0617459744
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to