homepage Welcome to WebmasterWorld Guest from 54.205.119.163
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
Strange swf resize bug in IE and Safari
Handlebar




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

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" />
</object>

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

#sa
{
font-size:8pt;
float:left;
margin-right:15px;
margin-left:10px;
width:480px;
}

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?

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved