Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Strange swf resize bug in IE and Safari



4:01 pm on Apr 8, 2008 (gmt 0)

5+ Year Member

I have made a simple photo viewer to embed into a div container on a page. I have done this several times before on many sites, but for some reason, this time I am encountering a strange problem. The swf file displays properly in Firefox, but when I open the page in IE7, it shrinks the swf down. Oddly, it seems to remain at the same declared height, yet "resize" the photos into some strange smaller width (around half the width of the swf).

I've went through several tests to try to find the cause.

First off, the "published" html from Flash (professional 8) displays the swf perfectly in FF, IE, and Safari. Here is the Flash published code:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="480" height="360" id="stipends" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="stipends.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="stipends.swf" quality="high" bgcolor="#ffffff" width="480" height="360" name="stipends" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

This object is placed inside a div container with the following css:


I tried removing the margin attributes, didn't solve it. I tried removing the float attribute, didn't solve it. I tried making the width much larger than the swf, didn't solve it either.

So I started messing around with the object code, adding:

<param name="scale value="NOSCALE" />

This seemed to at least partially correct it in IE, except now the right side of the viewer is cropped, only displaying a little over half the viewer.

So I went through the whole process of messing around with the css, trying wmode=transparent and everything I could think of. The problem remains unsolved.

Out of curiousity, I looked at it in Safari and much to my suprise, Safari was doing the exact same scaling down that IE was! It is certainly rare that Safari behaves in accordance with IE but different than FF!

Some notes:

-the "sa" div is nested inside another div called "copy" with this css; #copy {text-align:left; position:relative; top:8px; left:3px; float:left; height:480px; width:815px;}

-there is another floated element alongside the sa div, but if I remove that, it doesn't fix the problem.

I'm running out of ideas, any suggestions? Has anyone ever encountered such a thing before?


Featured Threads

Hot Threads This Week

Hot Threads This Month