Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

embedded .swf file rendered too small

size is declared properly, but the movie shows up smaller

4:48 am on Oct 15, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 13, 2005
posts: 59
votes: 0

I have a .swf file that is going in the web page for the logo. It is supposed to be 610px wide and 81px in height when rendered in the HTML. The actual .swf file, when viewed standalone, appears much larger than that - but I presume I should be able to just set its rendered / desired dimensions when I embed it in the HTML, as usual.

The odd thing is that the .swf, when embedded and viewed in the web page, is displayed extremely small.

I have checked my code - the width and height are declared properly.

I am embedding the .swf using SWFObject [blog.deconcept.com], but the same problem occurs if I use the Flash Satay method [a-list-apart.com]. Here are code snippets showing both versions:

The SWFObject embedding method:

<script type="text/javascript" src="swfobject.js"></script>


<div id="flash-logo">
<p>Requires Flash player and Javascript.</p> <!-- shown to browsers without Flash and JS -->
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject( "logo.swf", "logo", "610", "81", "9", "#000000" );
so.addParam( "wmode", "transparent" );
so.write( "flash-logo" );
// ]]>

That's just the HTML obviously - the imported JS is the standard SWFObject library.

And the Satay method to embed:

<div id="flash-logo">
<object type="application/x-shockwave-flash" style="width:610px; height:81px;" data="logo.swf">
<param name="movie" value="logo.swf">
<param name="wmode" value="transparent"><a href="http://www.macromedia.com/go/getflash/">Requires Flash player</a> <!-- shown to browsers without Flash -->

Now both methods work correctly with embedding and resizing other flash content on the same page. So there is something wrong with this particular embedding instance. Furthermore, the problem .swf appears small in all browsers (IE6+, Opera, Firefox, etc).

I am not at all a Flash pro. This .swf was provided to me by the client. Does the problem as described above sound like it is not a embedding error but is an issue caused by the .swf itself?

8:08 pm on Oct 15, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 13, 2005
posts: 59
votes: 0

RESOLVED - As it turns out, it was a problem with the swf's dimensions. So, the solution was simply to get a new, corrected .swf from the client ;)

Guess it could have been worse... All done here :)


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members