Topic: position of flash

I am testing pro2 for quick migration of my website from pro 1.9 to pro 2.0. During my test I have am using:
<script type="text/javascript">
            var flashvars = {};
            flashvars.galleryURL = "gallery.xml";
            //flashvars.firstImageIndex = "0";
            //flashvars.preloaderColor = "#FFFFFF";
            var params = {};
            params.allowfullscreen = true;
            params.allowscriptaccess = "always";
            params.bgcolor = "FFFFFF";
            params.wmode = "transparent";
            swfobject.embedSWF("simpleviewer.swf", "flashcontent", "100%", "100%", "9.0.124", false, flashvars, params);
        </script>

        <style type="text/css" media="screen">
            html, body    { height:100%; }
            body {
                margin:0;
                padding:0;
                overflow:auto;
                }
            a {
                color:#ff0000;
            }
            #flashcontent {
            z-index: 0;
            width: 900px;
            height: 750px;
            margin: 0 auto 0 auto;
            }

margin: 0 auto 0 auto; is not working, the flash is position at the left edge. This is working fine in pro 1.9.

Do I have to disable params.allowfullscreen = true; or is there any other reason for this non-Box behaviour.
This is not a problem in a specific webbrowser, it is tested with IE8, Firefox 3.5.5, Chrome

kind regards
arachnid

Re: position of flash

Sounds like an issue with your HTML/CSS. What happens if you switch out the SWF with the v1.9 SWF and change nothing else?

Felix Turner
SimpleViewer Support Team.

Re: position of flash

Felix wrote:

Sounds like an issue with your HTML/CSS. What happens if you switch out the SWF with the v1.9 SWF and change nothing else?

The code is the content of the index.html supplied by simpleviewer with a small change, see
#flashcontent {
            z-index: 0;
            width: 900px;
            height: 750px;
            margin: 0 auto 0 auto;
            }
But you can see it your self, goto
http://europe.delosgaia.nl/visit_to_sco … oto_album, this is pro 2.0 and is not centered
goto
http://europe.delosgaia.nl/visit_to_sco … oto_album, this is pro 1.9. and is centered
Same html/css.

CSS is located at http://data.delosgaia.nl/resources2/layout/layout2.css

Re: position of flash

The HTML source in those 2 pages is not identical. Did you try switching out only the swf?

Felix Turner
SimpleViewer Support Team.

Re: position of flash

Felix wrote:

The HTML source in those 2 pages is not identical. Did you try switching out only the swf?

The first pages is just changed to pro 2.0, only the javascript for Pro 2.0 is not the same.

What else is not identical?

Re: position of flash

Felix wrote:

Sounds like an issue with your HTML/CSS. What happens if you switch out the SWF with the v1.9 SWF and change nothing else?

Felix,

On a testpage I have switch out the simpleviewer.swf with the 1.9 swf and "margin: 0 auto 0 auto"is working fine. It seems that this is a problem in the 2.0 flash.

Demo:
2.0 SWF  http://europe.delosgaia.nl/visit_to_sco … foto_album
1.9 SWF  http://europe.delosgaia.nl/visit_to_sco … foto_album

Last edited by arachnid (2009-12-07 20:11:54)

Re: position of flash

the pages still are not identical. they use different swfobject embeds. if you just switch out the SWF nothing else, we can figure out if it's something in the JS or something in the SWF. thanks.

Felix Turner
SimpleViewer Support Team.

Re: position of flash

Felix wrote:

the pages still are not identical. they use different swfobject embeds. if you just switch out the SWF nothing else, we can figure out if it's something in the JS or something in the SWF. thanks.

The SWF 1.9 is only switched out, it is hardly to see but the flash is on the left edge. There are two thumb frames visible, no images and my copyright mark at the right. Bring the mousecursor to the middle and on the top appears the button in the image.

Re: position of flash

OK something weird is happening there on the v1.9 version...

To go back to the original problem of centering the SWF, it's quite possible that CSS positioning may be different between v1.9 and v2 due the the different version of SWFObject being used. It should be fairly easy to rejig the CSS to work with the latest SWFObject.

Felix Turner
SimpleViewer Support Team.

Re: position of flash

Felix wrote:

OK something weird is happening there on the v1.9 version...

To go back to the original problem of centering the SWF, it's quite possible that CSS positioning may be different between v1.9 and v2 due the the different version of SWFObject being used. It should be fairly easy to rejig the CSS to work with the latest SWFObject.

Yes I can, I have already found a way but it is still odd that something basic  like margin 0 auto 0 auto is not working on the flash itself.
Rome is not build in one day!!

big_smile