8 Replies Latest reply: Aug 18, 2007 7:26 AM by Newsgroup_User RSS

    Can't put video within template,

    Stephen Pickering122 Community Member
      Hi,

      I am using Dreamweaver CS3. Is there a way to insert a flash video within a page linked to a template? I always get the error "making this change would require changing code that is locked by a template or a translator". I tried unlinking, inserting the video, then relinking but I get two regions that are not associated with the template and so ruin the layout once saved. I need all pages to be linked to the template as the navigational links are constantly changing/updating - these need to be consistent with every page.

      What can I do?!

      THanks,

      Steve
        • 1. Re: Can't put video within template,
          Stephen Pickering122 Community Member
          Also, I know it is with all templates as I created a new template from scratch with nothing but three lines of text. As soon as it is created into a template, any new pages based on it cannot insert a flash video. The flash video I am talking about is Insert>Media>Flash Video.
          I am inserting it this way because I compress it using Flash CS3 Video Encoder (which I don't believe gives me options for navigation).
          I assume the video is trying to put coding in the head where only the body is editable, except I made a new template with everything editable- same problem.
          • 2. Re: Can't put video within template,
            Newsgroup_User Community Member
            Turn off the check for Flash version option when you insert the video.
            That's the root cause of the problem. With that selected, DW tries to write
            a call to a javascript routine into the <body> tag, and you cannot do that
            in a template child page.

            --
            Murray --- ICQ 71997575
            Adobe Community Expert
            (If you *MUST* email me, don't LAUGH when you do so!)
            ==================
            http://www.dreamweavermx-templates.com - Template Triage!
            http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
            http://www.dwfaq.com - DW FAQs, Tutorials & Resources
            http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
            ==================


            "is this taken?" <webforumsuser@macromedia.com> wrote in message
            news:fa40lb$eeh$1@forums.macromedia.com...
            > Also, I know it is with all templates as I created a new template from
            > scratch
            > with nothing but three lines of text. As soon as it is created into a
            > template, any new pages based on it cannot insert a flash video. The
            > flash
            > video I am talking about is Insert>Media>Flash Video.
            > I am inserting it this way because I compress it using Flash CS3 Video
            > Encoder
            > (which I don't believe gives me options for navigation).
            > I assume the video is trying to put coding in the head where only the body
            > is
            > editable, except I made a new template with everything editable- same
            > problem.
            >


            • 3. Re: Can't put video within template,
              Stephen Pickering122 Community Member
              Murray, Thank you! What a simple solution. Doing a search I couldn't find any answers that worked- they all dealt with corrupt config files, etc.

              Thank you again,

              Steve
              • 4. Re: Can't put video within template,
                Newsgroup_User Community Member
                Good luck, Steve! Now, if you *REALLY* want to have that check for Flash
                versions, there is a way to do that, too.

                --
                Murray --- ICQ 71997575
                Adobe Community Expert
                (If you *MUST* email me, don't LAUGH when you do so!)
                ==================
                http://www.dreamweavermx-templates.com - Template Triage!
                http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
                ==================


                "is this taken?" <webforumsuser@macromedia.com> wrote in message
                news:fa521j$m91$1@forums.macromedia.com...
                > Murray, Thank you! What a simple solution. Doing a search I couldn't
                > find any answers that worked- they all dealt with corrupt config files,
                > etc.
                >
                > Thank you again,
                >
                > Steve


                • 5. Re: Can't put video within template,
                  JimboSun
                  How, how? How do we have the Check for Flash in a Template Child Page?
                  • 6. Re: Can't put video within template,
                    Newsgroup_User Community Member
                    When you insert Flash video with Flash detection and prompting, DW wants to
                    put this into the body tag -

                    onLoad="MM_CheckFlashVersion('7,0,0,0','Content on this page requires a
                    newer version of Adobe Flash Player. Do you want to download it now?');"

                    e.g.,

                    <body onLoad="MM_CheckFlashVersion('7,0,0,0','Content on this page requires
                    a newer version of Adobe Flash Player. Do you want to download it now?');">

                    Let's assume that you have a child page with the video already inserted
                    WITHOUT Flash detection.

                    What you would need to do would be to create a DUMMY page, (FILE | New >
                    Basic HTML), and insert the video on that page, then copy and paste from
                    that page into your template child page.

                    First, copy and paste the Flash detection script -

                    change this -

                    </head>

                    to this -

                    <script type="text/javascript">
                    function MM_CheckFlashVersion(reqVerStr,msg){
                    with(navigator){
                    var isIE = (appVersion.indexOf("MSIE") != -1 &&
                    userAgent.indexOf("Opera") == -1);
                    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
                    if (!isIE || !isWin){
                    var flashVer = -1;
                    if (plugins && plugins.length > 0){
                    var desc = plugins["Shockwave Flash"] ? plugins["Shockwave
                    Flash"].description : "";
                    desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash
                    2.0"].description : desc;
                    if (desc == "") flashVer = -1;
                    else{
                    var descArr = desc.split(" ");
                    var tempArrMajor = descArr[2].split(".");
                    var verMajor = tempArrMajor[0];
                    var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") :
                    descArr[4].split("r");
                    var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
                    flashVer = parseFloat(verMajor + "." + verMinor);
                    }
                    }
                    // WebTV has Flash Player 4 or lower -- too low for video
                    else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer =
                    4.0;

                    var verArr = reqVerStr.split(",");
                    var reqVer = parseFloat(verArr[0] + "." + verArr[2]);

                    if (flashVer < reqVer){
                    if (confirm(msg))
                    window.location =
                    " http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
                    }
                    }
                    }
                    }
                    </script>
                    </head>


                    Then, assuming you have no other events in the child page's body tag, change
                    this -

                    </head>

                    to this -

                    <script type="text/javascript">
                    <!--
                    window.onload(MM_CheckFlashVersion('7,0,0,0','Content on this page requires
                    a newer version of Adobe Flash Player. Do you want to download it now?');
                    -->
                    </script>
                    </head>

                    and you should be all set.

                    (by the way, my example is set to check for version 7)

                    --
                    Murray --- ICQ 71997575
                    Adobe Community Expert
                    (If you *MUST* email me, don't LAUGH when you do so!)
                    ==================
                    http://www.dreamweavermx-templates.com - Template Triage!
                    http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                    http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                    http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
                    ==================


                    "JimboSun" <webforumsuser@macromedia.com> wrote in message
                    news:fa5sph$jkk$1@forums.macromedia.com...
                    > How, how? How do we have the Check for Flash in a Template Child Page?


                    • 7. Re: Can't put video within template,
                      JimboSun Community Member
                      Thank You Murray! I'll try it out.
                      • 8. Re: Can't put video within template,
                        Newsgroup_User Community Member
                        Good luck.

                        --
                        Murray --- ICQ 71997575
                        Adobe Community Expert
                        (If you *MUST* email me, don't LAUGH when you do so!)
                        ==================
                        http://www.dreamweavermx-templates.com - Template Triage!
                        http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                        http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                        http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
                        ==================


                        "JimboSun" <webforumsuser@macromedia.com> wrote in message
                        news:fa6v8g$p7o$1@forums.macromedia.com...
                        > Thank You Murray! I'll try it out.