1 Reply Latest reply on May 31, 2013 4:55 AM by nkukard

    2 animations on a page - edgePreload conflict

    krisu-pl

      Hi!

       

      I created 2 html pages, then opened them in Edge Animate, added animations to divs and combined these files together, so I have 2 websites (animations) on a single page.

       

      Now I have 2 functions:

      1) function start_1(){

                     AdobeEdge.bootstrapCallback(function () {

                                              var myComp = AdobeEdge.getComposition("PAGE_1");

                                              myComp.getStage().play();

                                    });

      };

       

      2) function start_2(){

                     AdobeEdge.bootstrapCallback(function () {

                          var myComp = AdobeEdge.getComposition("PAGE_2");

                          myComp.getStage().play();

                     });

      };

       

       

      The problem is both of them launch the same animation (e.g. page 2 starts in both cases) like getComposition chooses wrong composition in the start_1() function.

       

       

      I found out that if I remove from the head this code:

      <script type="text/javascript" charset="utf-8" src="page2_edgePreload.js"></script>

      then the 1st function works correctly, so I think there is some conflict between edgePreload files.

       

      I also discovered that Edge adds 'class' to 'body' element, e.g. <body class="PAGE_1 PAGE_2" ....>

      and the last composition is the one that is triggered in both functions.

       

       

      Is there any solution to that problem?

        • 1. Re: 2 animations on a page - edgePreload conflict
          nkukard

          Hi there your animations are both being loaded over each other.

           

          Try adding this

           

          <body style="margin:0;padding:0;">

                    <div id="Stage1" class="PAGE_1">

                    </div>

                    <div id="Stage2" class="PAGE_2">

                    </div>

                    <div id="Stage3" class="PAGE_3">

                    </div>

          </body