Using SWFObject, the flash moves 1 pixel to the right on Firefox

Please check this page: http://islandhideaway.weebly.com/ For some reason, the Flash slideshow moves 1 pixel when opened in Firefox on my Mac. All other browsers make it fine, but only on Firefox does it leave 1 pixel of white space on the left!

I am using the most recent version of SWFObject. This is unfortunately a Weebly garbage site and I can't use jQuery on the system, so I can't make a real gallery ... so let's keep everything "don't use Flash for this" pep talk. This is a favor for a friend, and I already know how best to do it. :)

+2


a source to share


4 answers


you have to use this in your object code

<param name="SCALE" value="exactfit" />

      

and for menus you have to use transparent flash

<PARAM NAME=wmode VALUE=transparent> 

      



and find attachment and add this

wmode="transparent"

      

try it

+1


a source


I had the same problem and kc rajput's answer didn't work for me. (So ​​it could be two different errors.)

For me, the 1px error occurred depending on whether the browser viewport width was an odd or even number of pixels. So resizing the browser window just made the problem go away or come back. The Flash object was in the horizontal center.



Anyway, this setup helped me. Basically I just added border-left: 1px solid transparent;

for the element with margin-left: auto; margin-right: auto;

.

Of course, if your centered element already contains a border, this won't be so easy.

+1


a source


I realize this question has already been answered, but I was looking for this issue today and came across this link. I used a javascript fix which works really well. I found the original javascript in this discussion with a Mozilla bug and then modified it a bit.

https://bugzilla.mozilla.org/show_bug.cgi?id=550246

Here is the javascript I used (hope this displays correctly in this post):

<script type="text/javascript">
var isFireFoxMac=false;
if (navigator.userAgent.indexOf("Firefox")!=-1) {
    if (navigator.platform == "MacIntel" || navigator.platform == "MacPPC") {
        isFireFoxMac = true;
    }
}
function isEven(value){
    return (value%2 == 0);
}
function ensureOddWidth() {
    var width = window.innerWidth;
    if (isEven(width)) {
      self.resizeTo(width-1, window.outerHeight);
    }
}
if (isFireFoxMac) {
    window.onresize = ensureOddWidth;
    window.onload = ensureOddWidth;
}
</script>

      

0


a source


You can also do something like:

div.flashContainer {position:relative; width:200px; left:50%; margin-left:-100px }

      

Replace the width value with your value and make the negative half of the margin to the left. Another standard way to center something that avoids the edge: 0 auto error.

0


a source







All Articles