ActiveDen

SWFObject sizing problem..

2309 posts
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Beta Tester
  • Exclusive Author
  • Sold between 100 and 1 000 dollars
  • Bought between 1 and 9 items
  • United States
  • Referred between 10 and 49 users
theflyingtinman says

I have a swf ( 645×250 ) loading with SWFObject. When I run it locally, no problem.

When I run it on my server there is a large ‘border’ on three sides of the swf (about half an inch left right and bottom) . The border is still “Flash” – (ie right-clicking on it shows the Flash context menu) not html.

2 years ago
4213 posts
  • Has been a member for 3-4 years
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Community Superstar
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Bought between 100 and 499 items
  • United States
  • Referred between 50 and 99 users
CodingJack says

Maybe this might help:


<style>

/* This fixes an outline bug for swfObject */
#swfDiv {
     outline: none;
}

</style>

2 years ago
2309 posts
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Beta Tester
  • Exclusive Author
  • Sold between 100 and 1 000 dollars
  • Bought between 1 and 9 items
  • United States
  • Referred between 10 and 49 users
theflyingtinman says

Thanks. But this is not the “outline” problem (I found plenty of references to that problem while googling an answer for this one) It is actually the flash stage is being rendered larger than the size specified in the “width” and “height” parameters of the object tag.

The weirdest thing is it renders perfectly in all the following scenarios:
Firefox, when it is hosted locally (on the file system or on the localhost server)
Chrome, when hosted locally
Chrome, when hosted on my remote server
\\

But when hoted on my remote server and run in Firefox it enlarges the Flash stage by 64 pixels width and 25 pixels height (gray is the html background color – white is the Flash stage color) :
\\

2 years ago
1623 posts
  • Has been a member for 3-4 years
  • Won a Competition
  • Author had a File in an Envato Bundle
  • Interviewed on the Envato Notes blog
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Bought between 10 and 49 items
  • Italy
  • Referred between 50 and 99 users
bitfade says
have you tried setting css container width/height with exact movie size ?
<style>

/* This fixes an outline bug for swfObject */
#swfDiv {
    width: 645px;
    height: 250px;
}

</style>
2 years ago
2201 posts
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Author had a File in an Envato Bundle
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 1 and 9 items
  • Netherlands
ArikB says

Adding to bitfade, I can imagine that the object will then somehow be cramped.

Try adding overflow: hidden;

to his css.

2 years ago
by
by
by
by
by