Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anita Thagaard Kristensen 33 posts 53 karma points
    Sep 04, 2010 @ 15:29
    Anita Thagaard Kristensen
    0

    How do I put <noScript> into my template?

    Hi

    I was told that I could put the <noScript> into my template if the user don't have a flashplayer installed. But it don't work.

    Can someone see what's wrong with my coding and help me out please.

    Here is my code placed in the template :

    <script type="text/javascript">
    var flashVars =
        {
            moviePath1:"<%=this.GetProperty("BGVideo1") %>",
            moviePath2:"<%=this.GetProperty("BGVideo2") %>",
            header1: "<%=this.GetProperty("H1") %>",
            header2: "<%=this.GetProperty("H2") %>"
        }
        var params =
        {
            menu:"false",
            wmode:"transparent"
        }
        swfobject.embedSWF("/media/flash/products/productvideo.swf", "flash1", "687", "267", "9.0.0", "expressInstall.swf", flashVars, params);</script>
    <noscript>
    <umbraco:Item field="BGPicture" runat="server"></umbraco:Item>
    <umbraco:Item field="BGPicture2" runat="server"></umbraco:Item>
    <umbraco:Item field="H1" runat="server"></umbraco:Item>
    <umbraco:Item field="H2" runat="server"></umbraco:Item>
    </script>

    I need help as quick as you can. Thanks.

    Anita

  • Rich Green 2246 posts 4008 karma points
    Sep 04, 2010 @ 15:36
    Rich Green
    0

    NoScript is for javascript, not flash.

    This is what you need http://code.google.com/p/swfobject/

    Rich

  • Kim Andersen 1447 posts 2196 karma points MVP
    Sep 04, 2010 @ 15:37
    Kim Andersen
    0

    Hi Anita

    Maybe it's not working for you because you have not closed the <noscript> the right way. Try changing the last </script> to </noscript> and see if that helps.

    /Kim A

  • Kim Andersen 1447 posts 2196 karma points MVP
    Sep 04, 2010 @ 15:47
    Kim Andersen
    0

    Ahh just re-read your post Anita, and just like Rich says, the content in the noscript-tag isn't shown to people who doesn't have flashplayer installed, but it's shown to people that have script disabled. You can read a little more about the tag here: http://www.w3schools.com/tags/tag_noscript.asp

    /Kim A

  • Anita Thagaard Kristensen 33 posts 53 karma points
    Sep 04, 2010 @ 15:53
    Anita Thagaard Kristensen
    0

    Hi Rich

    I have looked at the link you gave me, but I can't figure it out. Sorry that I'm a newbie, but can you write the exact code that I need to get it to work. I would be gratefull for that....Thanks

    Anita

  • Rich Green 2246 posts 4008 karma points
    Sep 04, 2010 @ 15:55
    Rich Green
    0

    Hi,

    There is a 4 page tutorial here http://www.adobe.com/devnet/flashplayer/articles/alternative_content.html with a download sample which should have the code you need.

    (sorry don't have time to write it out here)

    Best of luck

    Rich

  • Anita Thagaard Kristensen 33 posts 53 karma points
    Sep 04, 2010 @ 16:16
    Anita Thagaard Kristensen
    0

    Hi

    Is there anyone else that can help me with the code. I can't figure it out....Please

    Anita

  • Anita Thagaard Kristensen 33 posts 53 karma points
    Sep 05, 2010 @ 00:14
    Anita Thagaard Kristensen
    0

    Hi

    I just solved the problem by using this code:

    <div>
     <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="687" height="267" id="flash1">
       <param name="movie" value="/media/flash/products/productvideo.swf" />
        <!--[if !IE]>-->
         <object type="application/x-shockwave-flash" data="/media/flash/products/productvideo.swf" width="687" height="267">
         <!--<![endif]-->
      <umbraco:Item field="BGPicture" runat="server"></umbraco:Item>
           <!--[if !IE]>-->
         </object>
        <!--<![endif]-->
              </object>
    </div>
    <script type="text/javascript">
     var flashVars =
        {
            moviePath1:"<%=this.GetProperty("BGVideo1") %>",
            moviePath2:"<%=this.GetProperty("BGVideo2") %>",
            header1: "<%=this.GetProperty("H1") %>",
            header2: "<%=this.GetProperty("H2") %>"
        }
        var params =
        {
            menu:"false",
            wmode:"transparent"
        }
        swfobject.embedSWF("/media/flash/products/productvideo.swf", "flash1", "687", "267", "9.0.0", "expressInstall.swf", flashVars, params);</script>

    I found a useful link on this site : http://www.bobbyvandersluis.com/swfobject/generator/index.html

    I want to thanks Rich for leading me on the right way. His link was useful too.

    Anita

Please Sign in or register to post replies

Write your reply to:

Draft