Not signed in (Sign In)

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

    • CommentAuthorJakob
    • CommentTimeJan 15th 2008
     
    I'm new to this forum and a newbie w.r.t. Flash. My version is still Flash 5 with Win98SE on a PIII. But I can run the latest Flash displays on the Web. Here is the code of my Home page that I have modified with the SWFObject JS in order to be fully W3C:
    -----------------------------------------------------------------------------------------------------------------------------------------------
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <head>
    <title>Tiferet Organic - Home</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="description" content="A couple of lines describing this web page">
    <meta http-equiv="Content-Language" content="en">
    <meta name="keywords" content="keyword1,keyword2,key phrase1,key phrase2">

    <style type="text/css">
    @import url("style.css");

    <!--
    body {margin: 0; padding: 0;background-color: #000000;color: #ffffff;}
    -->
    </style>
    </head>
    <body class="Style1" scroll="no" margin:0 padding:0 background-color:#000000>
    <!-- URL's used in the movie--> <!-- text used in the movie--> <!--under construction under construction -->

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

    <div id="Home">
    This text is replaced by the Flash movie.
    </div>

    <script type="text/javascript">
    var soHome = new SWFbject("index.htm", "top_home1289x960.swf", "1280", "960", "5", "#000000");
    so.addParam("height","100%");
    so.addParam("width","100%");
    so.addParam("align","middle");
    so.addParam("menu","true");
    so.addParam("quality","autohigh");
    so.addParam("wmode","transparent");
    so.addParam("classid","clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");
    so.write("soHome");
    </script>
    <!-- this is content that is spiderable and corresponds to the swf contents because the swf itself usually is not
    spiderable -->
    <h1>Home - Tiferet Organic Products</h1>
    <ul>
    <li><a href="http://www.tiferetorganic.com/">Home</a></li>
    <li><a href="http://www.tiferetorganic.com/company_index.htm">Company</a></li>
    <li><a href="http://www.tiferetorganic.com/wellness_center_index.htm">Wellness
    Center</a></li>
    <li><a href="http://www.tiferetorganic.com/why%20organic_index.htm">Why Organic</a></li>
    <li><a href="http://www.tiferetorganic.com/products_index.htm">Products</a></li>
    <li><a href="http://www.tiferetorganic.com/recipes_index.htm">Recipes</a></li>
    <li><a href="http://www.tiferetorganic.com/contact%20us_index.htm">Contact
    Us</a></li>
    </ul>

    </BODY>
    </HTML>
    -----------------------------------------------------------------------------------------------------------------------------------------------
    The only thing that appears when I preview in the Browser is the last bit with all the li tags. Does anybody have a clue as to what is going on?

    Sincerely,
    Jakob
    Montreal
    • CommentAuthorphilip
    • CommentTimeJan 22nd 2008
     
    hi jakob

    sorry i didn't respond earlier, i haven't logged in for a while

    there are a number of changes i suggest you make to your page.

    1. put the SFWObject.js link in the head of your document, not the body
    2. your params are out of whack... many of them aren't needed when using SWFObject (it takes care of them for you).

    remove these:
    so.addParam("height","100%");
    so.addParam("width","100%");
    so.addParam("align","middle");
    so.addParam("menu","true");
    so.addParam("quality","autohigh");
    so.addParam("classid","clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");

    it's ok to leave this one, but ONLY if you really need the SWF to be transparent:
    so.addParam("wmode","transparent");

    set your width and height using SWFObject. either choose the width/height you've already specified ("1280", "960"), or change to "100%","100%" (what you specified in the addParams).

    the ID is SWFObject is the ID for the *SWF*. the so.write call requires the ID for the HTML element you want to place the SWF into.

    this:


    <div id="Home">This text is replaced by the Flash movie.</div>

    <script type="text/javascript">
    var soHome = new SWFbject("index.htm", "top_home1289x960.swf", "1280", "960", "5", "#000000");
    so.addParam("height","100%");
    so.addParam("width","100%");
    so.addParam("align","middle");
    so.addParam("menu","true");
    so.addParam("quality","autohigh");
    so.addParam("wmode","transparent");
    so.addParam("classid","clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");
    so.write("soHome");
    </script>


    should be this:

    <div id="Home">This text is replaced by the Flash movie.</div>

    <script type="text/javascript">
    var soHome = new SWFbject("index.htm", "homeSWF", "1280", "960", "5", "#000000");
    so.addParam("wmode","transparent");
    so.write("Home");
    </script>


    - philip
    • CommentAuthorphilip
    • CommentTimeJan 22nd 2008
     
    BTW the code examples i gave you use SWFobject 1.5, not 2.0. SWFObject 2.0 uses completely different syntax.
    • CommentAuthorJakob
    • CommentTimeJan 22nd 2008
     
    Dear Philip,

    I tried your suggestions, changing my SWFObject code according to your instructions and....nothing.Only the last HTML bit at the end, displayed like all the times previously. I have two .JS SWFObject scripts in the same directory as my HTML and .swf. They are probably identical, sent by 2 different people trying to help me. So now what?

    Sincerely,
    Jakob
    • CommentAuthorphilip
    • CommentTimeJan 22nd 2008
     
    wait a minute... in my rush i didn't even notice some big typos...

    you can't put "index.htm" in the SWFObject declaration... you need to put the location of your SWF file.

    also, SWFObject is misspelled.

    this

    <div id="Home">This text is replaced by the Flash movie.</div>

    <script type="text/javascript">
    var soHome = new SWFbject("index.htm", "homeSWF", "1280", "960", "5", "#000000");
    so.addParam("wmode","transparent");
    so.write("Home");
    </script>


    should be this

    <div id="Home">This text is replaced by the Flash movie.</div>

    <script type="text/javascript">
    var soHome = new SWFObject("INSERT_SWF_FILENAME_HERE.swf", "homeSWF", "1280", "960", "5", "#000000");
    so.addParam("wmode","transparent");
    so.write("Home");
    </script>


    honestly, the best thing you can do is copy the example files Geoff has on his blog, and substitute your SWF and SWF parameters.

    - philip
    • CommentAuthorJakob
    • CommentTimeJan 23rd 2008
     
    Dear Philip,

    I downloaded the latest SWFObject.JS file and
    copied it into the same folder as my HTML/Flash files. I put this:
    <script type="text/javascript" src="SWFObject.js"></script> inside the
    <head></head> tags. Within the <body></body> tags I put the SWFObject
    script like so: (no pun intended :-) )
    ---------------------------------------------------------------------------­--------------------------------------------------------------------
    <div id="Home">
    This text is replaced by the Flash movie.
    </div>

    <script type="text/javascript">

    var so = new SWFObject("top_home1280x960.swf","Home","1280","960","5","#000000");
    so.addVariable("wmode","transparent");
    so.write("Home");

    </script>
    ---------------------------------------------------------------------------­--------------------------------------------------------------------
    And the result is still....nothing. Any ideas?

    Sincerely,
    Jakob
    • CommentAuthorphilip
    • CommentTimeJan 23rd 2008
     
    Jakob

    you've changed addParameter to addVariable... this won't work for wmode.

    also, the SWFObject filename is all lowercase (you have it typed as SWFObject.js). this may not work on your server if your server is set to be case-sensitive. change it to swfobject.js.

    please make sure you're using the SWFObject 1.5.1 file, not SWFObject 2.0 (you've cross-posted a bunch of times).

    again, the best thing you can do is copy the example files Geoff has on his blog, and substitute your SWF & parameters. http://blog.deconcept.com/swfobject/swfobject.html

    i have additional SWFObject 1.5 examples on my site: http://pipwerks.com/lab/swfobject

    - philip
    • CommentAuthorJakob
    • CommentTimeJan 23rd 2008
     
    Dear Philip,

    I made the mods you suggested and it.....works! The script statement in the <head> tags is now: <script type="text/javascript" src="swfobject.js"></script>. And the rest of the JS code in the <div> & <body> tags is:

    <div id="Home">
    This text is replaced by the Flash movie.
    </div>

    <script type="text/javascript">

    var so = new SWFObject("top_home1280x960.swf","Home","1024","625","5","#000000");
    so.write("Home");

    </script>

    Actually, using so.addParam or so.addVariable makes no difference whatsoever. I had to change the dimensions of the display for reasons still unknown to me (since the previous size - 1280x960 - filled my screen and now, it's way too big). But 1024x625 fits my screen to a tee.
    Anyway Philip, THANK YOU VERY MUCH. If there is anything I can help you with, just ask. :-)

    Sincerely,
    Jakob
    • CommentAuthorphilip
    • CommentTimeJan 23rd 2008
     
    glad you got it working. :)