0 Replies Latest reply on Nov 4, 2013 1:17 PM by TonyEllisMedia

    External Webpages content dropzone

    TonyEllisMedia Level 1

      Everything seems to work ok until I click on the buttons a couple of times. They first load super quick and then start taking a long time to load. Is there a way to clear the cache on mouse up or mouse down?

      I am using:

       

      // Load stylesheet for menu

      yepnope({load: "style/menu.css"});

       

      // Load Edge Commons library "All-in-One"

      yepnope({

                load: "http://cdn.edgecommons.org/an/1.0.0/js/min/EdgeCommons.js",

                complete: function() {

       

                          // Define action for onClick of menu items

                          var loadPage = function(url) {

                                    console.log("loadPage: ", url);

                                    EC.loadComposition( url, sym.getSymbol( "content" ) );

                          };

      // Load external Composition into symbol named "dropzone01"

      EC.loadComposition("composition1/web01.html", sym.getSymbol("dropzone01"));

                          // Load external Composition into symbol named "dropzone02"

      EC.loadComposition("composition2/web02.html", sym.getSymbol("dropzone02"));

                          // Load external Composition into symbol named "dropzone03"

      EC.loadComposition("composition3/web03.html", sym.getSymbol("dropzone03"));

                          // Load external Composition into symbol named "dropzone04"

      EC.loadComposition("composition4/web04.html", sym.getSymbol("dropzone04"));

       

       

                          // Create config object for menu

                          // The property "dataProvider" defines the multi level structure of the menu

                          var config = {

                                              dataProvider: [

                                                        {label: "Home", onClick: function(){ loadPage("page1/index.html") } },

                                                        {label: "About", onClick: function() { loadPage("page2/index.html") }, items: [

                                                                  {label: "Tips", onClick: function() { loadPage("page3/index.html") } },

                                                        ]},

                                                        {label: "Features", onClick: function() { loadPage("page3/index.html") }, items: [

                                                        //          {label: "Parallax", onClick: function() { loadPage("page4/DemoPageA.html") } },

                                                        //          {label: "Spotlight", onClick: function() { loadPage("page5/DemoPageB.html") } },

                                                        ]}

                                              ]

                          };

       

       

                          // Setup menu

                          sym.getSymbol("menu").getVariable("setup")(config);

                }

      });

       

       

      Button1:

      sym.play("image1");

      EC.loadComposition("composition1/web01.html", sym.getSymbol("dropzone01"));

       

      Button2:

      sym.play("image2");

      EC.loadComposition("composition2/web02.html", sym.getSymbol("dropzone01"));

       

      Button3:

      sym.play("image3");

      EC.loadComposition("composition3/web01.html", sym.getSymbol("dropzone01"));

       

      Button4:

      sym.play("image4");

      EC.loadComposition("composition4/web02.html", sym.getSymbol("dropzone01"));