1 Reply Latest reply on Jul 22, 2015 5:55 PM by dajupe

    fix for multiple responsive animate projects on a single page not working( with code I am trying to use)

    pieces_of_nine Level 1

      I am re-posting on the same topic only I hope that this time I will be able to include the code I am working with.

      I am trying to include two different responsive edge animate projects on one html page but can't get them both to run. I contacted Adobe support on the phone and the rep sent me this link .http://blogs.adobe.com/edge/2014/10/16/using-responsive-edge-animate-compositions-in-dream weaver/. I tried using the method outlined in the post on my page but to no avail. If someone who may have tried this fix and had success or anyone who is just interested I would appreciate any suggestions to get it working. Here is my code with the edits suggested by the fix.

      <!--Adobe Edge Runtime-->
      <meta http-equiv="X-UA-Compatible" content="IE=Edge">
      <script>
        var custHtmlRoot="edgeanimate_assets/header/Assets/"; 
        var script = document.createElement('script'); 
        script.type= "text/javascript";
      script.src = custHtmlRoot+"edge_includes/edge.6.0.0.min.js";
        var head = document.getElementsByTagName('head')[0], done=false;
      
      
        // Create these variables
        var compArray = [],
        compIndex = 0;
      
        // Push the 1st composition
        compArray.push(
        function() {
        var custHtmlRoot="edgeanimate_assets/header/Assets/";
        var opts ={
          scaleToFit: "both",
          centerStage: "both",
          minW: "0px",
          maxW: "undefined",
          width: "970px",
          height: "465px"
      };
                      
        opts.htmlRoot =custHtmlRoot;
        AdobeEdge.loadComposition('header', 'EDGE-29553970', opts,
        {"dom":{}}, {"dom":{}});
      
      
        }
        };
      
        // Push the 2nd composition
        compArray.push(
        function() {
        var custHtmlRoot="edgeanimate_assets/dancer/Assets/";
        var opts ={
          scaleToFit: "both",
          centerStage: "horizontal",
          minW: "0px",
          maxW: "undefined",
          width: "823px",
          height: "387px"
      };
         
        opts.htmlRoot =custHtmlRoot;
        AdobeEdge.loadComposition('dancer', 'EDGE-6555625', opts,
        {"dom":{}}, {"dom":{}});
        }
        );
      
        // Create this function
        function LoadNext() {
        if (compIndex < compArray.length)
        compArray[compIndex]();
        ++compIndex;
        }
      
        script.onload = script.onreadystatechange = function(){
        if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
        done=true;
      
        // Call the above created function and pass it to the AdobeEdge.bootstrapCallback
        // For more info on bootstrapCallback, see http://blogs.adobe.com/edge/2012/05/15/bootstrapping-edge-compositions/
        LoadNext();
        AdobeEdge.bootstrapCallback(function() {
        LoadNext();
        });
      
        script.onload = script.onreadystatechange = null;
        head.removeChild(script);
        }
        };
      
        head.appendChild(script);
      </script>
          
      <style>
        .edgeLoad-EDGE-29553970 { visibility:hidden; }
        .edgeLoad-EDGE-6555625 { visibility:hidden; }
      </style>
      <!--Adobe Edge Runtime End-->