Not signed in (Sign In)

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

    • CommentAuthoroli99via
    • CommentTimeFeb 18th 2008
     
    This is my current page: http://www.onychadesign.com/
    (Of course, it's not a valid XHTML)

    So I added SWFObject, I can see Flash in IE and FF but my footer has moved up to -- directly underneath Flash. Take a look here:

    http://www.onychadesign.com/flash.html

    I didn't do anything to it, just adding SWFObject. Worse yet, in FF, the entire page turned to dark grey like the page's background. Why's that? Can someone help?
    • CommentAuthorphilip
    • CommentTimeFeb 18th 2008
     
    RE: the gray background, double-check your closing brackets. you may have missed a "/div". i've done that before and had a very similar result.

    your current code:


    <!-- flash header -->
    <div id="flashcontent"/>
    <script type="text/javascript" src="javascript/swfobject.js"></script>
    <script type="text/javascript">
    var so = new SWFObject("swf/partners", "flashnav", "190", "55", "9", "#FFFFFF");
    so.addParam("quality", "high");
    so.addParam("image", "swf/images/mivamerchant_logo.jpg");
    so.write("flashcontent");
    </script>
    <!-- /flash header -->


    should probably be changed to this:

    <head>
    <script type="text/javascript" src="javascript/swfobject.js"></script>
    </head>

    <body>
    <!-- flash header -->
    <div id="flashcontent"/>
    </div>
    <script type="text/javascript">
    var so = new SWFObject("swf/partners", "flashnav", "190", "55", "9", "#FFFFFF");
    so.addParam("image", "swf/images/mivamerchant_logo.jpg");
    so.write("flashcontent");
    </script>
    <!-- /flash header -->
    </body>


    changes:
    1. moved swfobject.js link to head of the document
    2. moved the script outside of the target DIV
    3. removed "quality=high" bit because that's the default setting and doesn't need to be declared.
    4. closed the div element with a /div tag.

    - philip
    • CommentAuthoroli99via
    • CommentTimeFeb 18th 2008
     
    Hi Philip,

    I read your post that says we *must* include the height and width, so I added in the code.
    <div id="flashcontent" style= "width:190px; height:55px;"></div>

    Guest what?! It actually worked both in IE and FF!!!

    I will go ahead and remove the "quality=high" now. I will also try the solution you gave to see which one works best!

    Thanks for your quick response.
    • CommentAuthorphilip
    • CommentTimeFeb 18th 2008 edited
     
    glad it helps.

    bear in mind, when i wrote 'must include CSS size parameters' (width and/or height), i was referring specifically to SWFs embedded via SWFObject in a CSS-based layout containing floated elements. the 'flashcontent' DIV should expand automagically. however, it's always a good idea to specify the width/height in your CSS if you can, in order to avoid CSS layout issues later on. :)

    - philip
    • CommentAuthoroli99via
    • CommentTimeFeb 18th 2008
     
    I see. Glad you told me. I followed your instructions and it worked too!! =D

    Thank you so much. I really appreciate it.