Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorcharlotte
    • CommentTimeDec 21st 2006
     
    Hello all,
    Swfobject is working great and it has truly helped solve a whole lot of problems. I only have one question that I hoped to get answered.
    What parameter would I use ,(scale ,no scale) I would assume ?, to both not scale the movie while centering AND not crop the movie.

    Please check
    www.bayrocket.com/nbu

    Thanks
    Craig
  1.  
    Hi Craig,
    just use the actual size in pixels, as shown in example below (parameters 3 and 4 of var so - width and height). Use noScale in your flash publish settings. You should centralize it with CSS. I´m not a CSS master, but I guess it´ll work. (Someone please correct if that´s the case... ;) )

    Example:
    Let´s say you have a 520x300 pixels swf movie.

    CSS FILE
    #centralize{
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -260px;
    margin-top: -150px;
    height: 300px;
    width: 520px;
    }
    In your HTML file:
    <div id="centralize">
    <!-- If javascript is disabled this text will be displayed -->
    <p>Write alternate content here.</p>
    </div>

    <script type="text/javascript">
    <!--
    // embeds flash into html if javascript is enabled. otherwise, content presented up, in 'centralize', will be displayed
    var so = new SWFObject("myMovie.swf", "myMovie", "520", "300", "8", "#FFFFFF", true);
    so.setAttribute('xiRedirectUrl', 'http://www.yourdomain.com/'); // must be the absolute URL to your site
    so.write("centralize");
    //-->
    </script>

    Lucia Dossin
    • CommentAuthorGeoff
    • CommentTimeDec 27th 2006
     
    you would set the scale like this:

    so.addParam("scale", "noscale");

    or you can set it inside your swf as:

    Stage.scaleMode = "noscale"; (i think, check google for exact code you need)