Not signed in (Sign In)

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

    • CommentAuthorandrea
    • CommentTimeDec 2nd 2007
     
    This code works in Safari, but not Firefox.
    I'm trying to make the swf have a 12% height so it matches with the swf files later in the site.

    Any ideas?

    Here's my code:
    var so = new SWFObject("header_for_index.swf", "andrea goldman", "100%", "12%", "8","#ffffff");
    so.addVariable("initialURL", escape(document.location));
    so.addParam("wmode", "transparent");
    so.addParam("height", "12%");
    so.addParam("salign", "lt");
    so.addParam("quality", "high");
    so.write("flashcontent");
    so.addParam('allowfullscreen', 'true');
    so.addVariable('overstretch', 'true');
    //]]>

    Here's the site: http://www.andreagoldman.org/index2.html

    THANKS
    • CommentAuthorAran
    • CommentTimeDec 2nd 2007
     
    A few things:

    1. You don't need so.addParam("height", "12%"); as you have already defined the height and width in the new SWFObject() line.
    2. You have some bad formatting up in your head area which might stop some browsers continuing properly (IE complains at line 53, char 4 - syntax error)
    3. The size if the flash area on page is determined by your containing DIV. You might want to set your flash to 100% / 100%, and ensure your CSS for the flashMovie DIV is working correctly.
    4. How come your are using CDATA all over the place. Are you needing to parse the page in XML or something?
    • CommentAuthorandrea
    • CommentTimeDec 3rd 2007
     
    Thanks Aran...
    I followed all of your suggestions and seem almost there.

    FF still is acting weirdly, if I set the flashcontent's div to a width of 90%, it works, but then Safari's (and other browsers') swf width is too small!
    The new url is:

    http://andreagoldman.org/index3.html

    Any ideas would be very appreciated.
    • CommentAuthorphilip
    • CommentTimeDec 4th 2007
     
    hi andrea

    just some quick comments:

    this is most likely a CSS issue. in my experience, each browser handles percentages in CSS slightly differently; for instance, in firefox, an element inherits the height of its parent. this means the flashcontent div can't possibly be set to 12% of the browser's viewport height unless the html and body elements have been set to 100% height first. however, if you specify flashcontent to be 50 pixels tall, the containing element will automatically expand to fit it. moral of the story: percentages (for vertical sizing) are very annoying to work with. :)

    you might have more consistency from browser to browser if you use pixels to set the height.

    on the Flash end, you may also want to investigate the various scaleMode settings (i see you don't have any specified).

    - philip