3 Replies Latest reply on Sep 18, 2015 11:44 AM by resdesign

    Hi Edge community...

    connorh11666574

      I'm having trouble with my version of Edge (Fully updated, CC 2015)... It looks like i'm missing the code snippet button on my code panel... Can anyone help with this noob query...

        • 1. Re: Hi Edge community...
          foj Level 1

          many of the useful snippets, often referred to in tutorials, went a while back, you can add the missing ones manually in to 'my snippets' - is this what your talking about?

           

          (Someone posted a list of the missing ones in this thread: Re: What happened to the getVariable and setVariable snippets in CC 2014?).

          • 2. Re: Hi Edge community...
            resdesign Adobe Community Professional & MVP

            i you have the older versions just copy/paste what you need and then insert them in the snippets as mentioned above.

            • 3. Re: Hi Edge community...
              resdesign Adobe Community Professional & MVP

              Here is a list of some I use - change the paths and names to what you need.

              • Load a css file:

              $("<link/>",{"rel":"stylesheet","type":"text/css","href":"css/name.css"}).appendTo("#Stage");

              • Click event

              sym.$("name").bind('click',function(){

              // code here

              });

              • if using jquery = animate()  - with an array of images name and picture  changed to img instead of div

              sym.$("images").css({"opacity":0.00});

              sym.$("images").animate({"opacity":1.00},700).attr('src',"images/"+images[i]+".png");

              • create symbol

              var variableName = sym.createChildSymbol("symbolName", "Stage");

                // add a class name for eadh piece

                variableName.element.attr("id","idName"+i).addClass('className'+i);

              • delete symbol in a symbol

              sym.getSymbol("Symbol1").deleteSymbol();

              • setVariable

              sym.setVariable("myVariableName", "variableValue");

              • getVariable

              var myVariable = sym.getVariable("myVariableName");

              • random

              var myVar = Math.floor((Math.random()*8)+1);

              • sort

              varialbeName.sort(function() {return 0.5 - Math.random()});

              • set interval and open a web page

              setInterval(function() {

                  sym.stop();

                  window.open("http://www.adobe.com", "_blank");

              }, 30000);