0 Replies Latest reply on Apr 19, 2015 7:32 AM by jafproductions

    Integrating Edge animation into an html project

    jafproductions Level 1

      I have a quiz created in javascript and CreateJS, and I have intros for each section created in Adobe Edge.

      I have the main quiz in a Canvas div (<canvas id="mainCanvas" width="1280" height="720">  )

      And I have a div for the Edge animation  <div id="Stage" class="EDGE-4024456"></div>


      I am able to activate the Edge animation by doing:




      When the Edge animation ends a button comes up.

      In the button handler I am able to hide the Edge animation with:



      However I am not able to make the mainCanvas visible again.

      I assume it's because the mainCanvas is out of the current scope that the button handler is in. I tried many different ways to access the root or parent element but I can't get it to work.






      This is my main html:


      <!doctype html>

      <html class="no-js" lang="">


              <meta charset="utf-8">

              <meta http-equiv="X-UA-Compatible" content="IE=edge">

              <title>Burst Training</title>

              <meta name="description" content="">

              <meta name="viewport" content="width=device-width, initial-scale=1">



              <script src="lib/jquery-1.11.1.min.js"></script>

              <script src="lib/jquery-ui.js"></script>

              <script src="lib/edge.1.0.0.min.js"></script>

              <script src="lib/easeljs-NEXT.combined.js"></script>

              <script src="lib/preloadjs.js"></script>

              <script src="js/plugins.js"></script>

              <script src="js/jafLib.js"></script>

              <script src="js/Hover.js"></script>

              <script src="js/Button.js"></script>

              <script src="js/ToggleButton.js"></script>

              <script src="js/Dropdown.js"></script>

              <script src="js/ClickAndDrag.js"></script>

              <script src="js/main.js"></script>

           <!--   <script>

               yepnope({load: "http://simonwidjaja.github.com/EdgeCommons/live/EdgeCommons-0.7.1.min.js"}); 


              <!--Adobe Edge Runtime-->

              <script type="text/javascript" charset="utf-8" src="animations/section1/Scenario-1_edge.js"></script>


              .edgeLoad-EDGE-4024456 { display:none; }


              <!--Adobe Edge Runtime End-->

              <link rel="stylesheet" href="css/main.css" type="text/css" media="screen" charset="utf-8">





               <div id="mainContainer">


                  <canvas id="mainCanvas" width="1280" height="720">   



                   <div id="loadingScreen">

                      <div id="loadingmessage"></div>



                  <div id="animationScreen" style="width:100%;height:100%;"></div>



                  <div id="Stage" class="EDGE-4024456"></div>








      This is the button handler code in Adobe Edge.

      (Including stuff I tried that fails)


      console.log("pause button clicked");




      // Pause an audio track



      // Show an element



      //var div = document.getElementById("mainCanvas");


      //sym.getComposition().getStage().getSymbol("symbolName1").getSymbol("symbolName2").play(0 );








      var s = sym.getParentSymbol(); //valid object

      s = document.documentElement; //valid object





      //s = sym.$("Stage").getParentSymbol();

      s = s.getSymbol("mainCanvas"); //js error




      //s = sym.getComposition().getSymbol("mainCanvas");