Horrible bug in IE! Site looks completely wrong. Please help?

4 views
Skip to first unread message

Emma

unread,
Dec 3, 2009, 11:42:40 PM12/3/09
to SWFFit
I just finished a full screen Flash site that uses SWFFit. It looks &
works perfectly in all browsers on my Mac.

I got a chance to test it on a PC for the first time today though, and
while it's fine in Chrome and Firefox, IE is a nightmare! I have no
idea what could be causing this.

It looks fine if I view it in IE on a large monitor with the browser
open wide enough that SWFFIT doesn't need to implement scrollbars...
But if I make the browser window small, and then try to load the site,
everything looks completely messed up.

Multiple images that I have in movie clips are randomly cut off at the
bottom so they don't fully display, and depending on how small I make
the browser, sometime the placement of certain things is completely
off, by more than a few pixels.

The site is big (1200x900) so I really do need to use SWFFit to create
scrollbars for people with lower resolutions, but this bug in IE ruins
the site when SWFFit is enabled; I don't know what to do. I'm much
more of a designer than a developer so I really don't even know where
to begin with troubleshooting this. it's so discouraging because I
thought I just finished a perfect website, and then everything looks
wrong in a browser that 30% of people still use.

Is there anything that can be done to fix this? Any help is hugely
appreciated.

Here is my code (I deleted the meta tags/irrelevant stuff... the only
CSS I used was styles for the alternate content):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />
<title>deleted</title>
<meta name="description" content="deleted" />
<meta name="keywords" content="deleted" />
<meta name="copyright" content="deleted" />

<link rel="stylesheet" type="text/css" href="styles.css" />
<link rel="shortcut icon" href="/favicon.ico"/>

<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript" src="swffit.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
params.wmode = "transparent";
var attributes = {};
attributes.id = "my_flash";
swfobject.embedSWF("site.swf", "my_flash", "1200", "900",
"8.0.35.0", false, flashvars, params, attributes);
swffit.fit("my_flash",1024,800);
</script>

</head>
<body>
<div id="my_flash">
there's a bunch of alternate content here but I deleted it so it's
not in the way
</div>

</body>
</html>

If there's anything that can be done to fix this, I would really
really appreciate the help. Thank you so much for your time and work
on SWFFit by the way, it really is a very nifty thing and I just hope
I can get it working with this site I'm doing.

Miller Medeiros

unread,
Dec 3, 2009, 11:57:51 PM12/3/09
to swf...@googlegroups.com
flash has a bug on IE that sometimes make it doesn't get the right stage size.. - are you using the stage size to position/mask your content??

If you're using the stageWidth and stageHeight to calculate everything you need to add an enterframe that checks if the stageWidth and stageHeight are bigger than zero. like:

---

stage.addEventListener(Event.ENTER_FRAME, checkStageSize);

private function checkStageSize(event:Event):void {
    if(stage.stageWidth > 0 && stage.stageHeight > 0) {
            stage.removeEventListener(Event.ENTER_FRAME, loop);
        //add code to reposition your content after this line
       
    }
}

---

it happened on which IE version? do you have a working sample online?

cheers and good luck,

--
Miller Medeiros  |  www.millermedeiros.com


2009/12/3 Emma <emmagrap...@gmail.com>

--

You received this message because you are subscribed to the Google Groups "SWFFit" group.
To post to this group, send email to swf...@googlegroups.com.
To unsubscribe from this group, send email to swffit+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swffit?hl=en.



Miller Medeiros

unread,
Dec 3, 2009, 11:59:38 PM12/3/09
to swf...@googlegroups.com
ops.. forgot to change the method name on the removeEventListener...

the line:   stage.removeEventListener(Event.ENTER_FRAME, loop);
should be:  stage.removeEventListener(Event.ENTER_FRAME, checkStageSize);



2009/12/3 Miller Medeiros <millerm...@gmail.com>

Emma

unread,
Dec 4, 2009, 2:45:35 AM12/4/09
to SWFFit
Thank you so much for replying.

The thing is, I'm really not strong with scripting, so honestly I
don't even know where I would put that. The content is positioned
using this: http://www.estetica-design-forum.com/flash-forum/10619-fullscreen-flash-resource.html
and I don't know how to add that code to the code I already have.

The actual live site I'm experiencing the issue with is here:
http://vapurl.com/n64ukusdxa

I think it was IE8 but it wasn't my own computer so I would have to go
back and double check that to be sure.

I can go back tomorrow and get a screenshot to show the exact issue if
that would help? Or maybe you can see the issue if you check it on IE
on your own computer...




On Dec 3, 8:57 pm, Miller Medeiros <millermedei...@gmail.com> wrote:
> flash has a bug on IE that sometimes make it doesn't get the right stage
> size.. - are you using the stage size to position/mask your content??
>
> If you're using the stageWidth and stageHeight to calculate everything you
> need to add an enterframe that checks if the stageWidth and stageHeight are
> bigger than zero. like:
>
> ---
>
> stage.addEventListener(Event.ENTER_FRAME, checkStageSize);
>
> private function checkStageSize(event:Event):void {
>     if(stage.stageWidth > 0 && stage.stageHeight > 0) {
>             stage.removeEventListener(Event.ENTER_FRAME, loop);
>         //add code to reposition your content after this line
>
>     }
>
> }
>
> ---
>
> it happened on which IE version? do you have a working sample online?
>
> cheers and good luck,
>
> --
> Miller Medeiros  |  www.millermedeiros.com
>
> 2009/12/3 Emma <emmagraphicdes...@gmail.com>
> > swffit+un...@googlegroups.com<swffit%2Bunsu...@googlegroups.com>
> > .

Emma

unread,
Dec 4, 2009, 2:48:01 AM12/4/09
to SWFFit
There are 2 external AS files positioning the content in the FLA.

// DO NOT EDIT THIS FILE
//FS_Script is Copyright 2008 Eoin Griffin
//This script is free. I'm curious to see if/how it will be used.
//Send feedback to griffi...@gmail.com and let me know how you find
it.
//
//The editable actionscript is all in edit_me.as
resizer();
Stage.align=BR;
Stage.scaleMode = "noScale"
var myListener:Object = new Object();
myListener.onResize = function(){
resizer();
}
Stage.addListener(myListener);
function fs_posit(locA,locB,target,offsetA,offsetB){
fs_top=-(Stage.height-originalheight)/2;
fs_right=(Stage.width-originalwidth)/2+originalwidth;
fs_bottom=(Stage.height-originalheight)/2+originalheight;
fs_left=-(Stage.width-originalwidth)/2;
if(offsetA.substr(offsetA.length-1)=="%"){
offsetA=(Stage.width/100)*offsetA.substr(0,offsetA.length-1);
}else{offsetA=Number(offsetA);}
if(offsetB.substr(offsetB.length-1)=="%"){
offsetB=(Stage.width/100)*offsetB.substr(0,offsetB.length-1);
}offsetB=Number(offsetB);
if(!offsetA)offsetA=0;
if(!offsetB)offsetB=0;
switch(locA){
case "top": target._y=fs_top + offsetB;
break;
case "center": target._y=originalheight/2 + offsetB;
break;
case "bottom": target._y=fs_bottom + offsetB;
}
switch(locB){
case "left": target._x=fs_left + offsetA;
break;
case "center": target._x=originalwidth/2 + offsetA;
break;
case "right": target._x=fs_right + offsetA;
}
}


and this:

//FS_Script is Copyright 2008 Eoin Griffin
//This script is free. I'm curious to see if/how it will be used.
//Send feedback to griffi...@gmail.com and let me know how you find
it.
//


//It's important to set the initial dimensions of your flash movie
here (stage width and height)
//to whatever dimensions you're working in.
originalheight=900;
originalwidth=1200;

function resizer(){
//The fs_posit function has 5 parameters: Vertical position (top,
center or bottom);
//horizontal position (left, center or right);
//the target. That's the location/instance name of the target you wish
to position;
//The final 2 parameters are offset value from the desired position.
//In the first example below. The right arrow is given a 10px offset
to the left and
//a 60px offset downwards. Coordinates in actionscript start from an
origin of 0,0 in the top left.
//
//Only the first 3 parameters are required. The rest are optional.

fs_posit("center","right",righta,"-10%","60");
fs_posit("top","center",upa);
fs_posit("center","left",lefta);
fs_posit("bottom","center", downa);
fs_posit("top","left",topleft);

//set any variables or functions here that you want to have affected
by the changing resolution.
//The following variables are samples. Delete them.
testvar=Stage.width;
testvar2=Stage.height;
}

Miller Medeiros

unread,
Dec 4, 2009, 10:27:19 AM12/4/09
to swf...@googlegroups.com
Emma,

the problem is really happening on IE8 and IE7 (on IE7 some of the content doesn't even show at all)...

I'm really busy right now and don't have time to check your code. sorry about that.

ps: the code that I've sent before was AS3 the one that you're using is AS2..


good luck,

--
Miller Medeiros  |  www.millermedeiros.com


2009/12/4 Emma <emmagrap...@gmail.com>
}

Emma

unread,
Dec 4, 2009, 12:37:30 PM12/4/09
to SWFFit
Do you have any thoughts or suggestions for how I can fix this
though? Or like, do you know of any other resource I can reach out
to?

It's like a no win situation, because the site is so big I really
can't have it without scrollbars, but then when I use SWFFit to create
them it's breaking the site in IE.

And I really have no idea how to fix it. :(

I totally understand you're busy, but I just don't even know where to
begin to solve this? I don't even know if I should try to get help
from a Flash person or a JavaScript person or? I'm so lost right
now. Any suggestions to even point me in the direction of where to
look for answers on fixing this would be very helpful?

Please/Thank you/Sorry...




On Dec 4, 7:27 am, Miller Medeiros <millermedei...@gmail.com> wrote:
> Emma,
>
> the problem is really happening on IE8 and IE7 (on IE7 some of the content
> doesn't even show at all)...
>
> I'm really busy right now and don't have time to check your code. sorry
> about that.
>
> ps: the code that I've sent before was AS3 the one that you're using is
> AS2..
>
> good luck,
>
> --
> Miller Medeiros  |  www.millermedeiros.com
>
> 2009/12/4 Emma <emmagraphicdes...@gmail.com>
>
>
>
> > There are 2 external AS files positioning the content in the FLA.
>
> > // DO NOT EDIT THIS FILE
> > //FS_Script is Copyright 2008 Eoin Griffin
> > //This script is free. I'm curious to see if/how it will be used.
> > //Send feedback to griffin.e...@gmail.com and let me know how you find
> > //Send feedback to griffin.e...@gmail.com and let me know how you find
> > swffit+un...@googlegroups.com<swffit%2Bunsu...@googlegroups.com>
> > .

Emma

unread,
Dec 4, 2009, 10:28:48 PM12/4/09
to SWFFit
*UPDATE*

If I take away the wmode transparent, the alignment issues and cut off
images are magically fixed in IE7.

But... I need the swf to be transparent to display the large tiled
wood image behind it. Is there any work around for this?

(By the way thanks so much for taking the time to look into this, I
know you're busy. But hopefully now that I [think] I found the cause,
maybe that makes it easier to find a solution?)

Emma

unread,
Dec 4, 2009, 11:23:52 PM12/4/09
to SWFFit
FOUND A FIX!!!! :)

Okay, I have no idea how or why, but when I load my main swf in a
container swf (level 2) that seems to magically fix everything. I
still have no clue what caused the issue to begin with, but at least
it's okay now. What a relief!!

Miller Medeiros

unread,
Dec 6, 2009, 12:32:33 AM12/6/09
to swf...@googlegroups.com
wmode transparent has many issues.. just google it and you will find..
(i don't recommend using it.. unless you really need it)

loading the swf file inside another probably is making your code to
only be executed after the stageHeight being available..

good to know that it worked.

cheers,

--
Miller Medeiros | www.millermedeiros.com

2009/12/4, Emma <emmagrap...@gmail.com>:
> swffit+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages