1 Reply Latest reply on Jan 4, 2016 4:23 AM by joel_pau

    Coloring using variable

    RedLight

      Hello, I'm trying to color objects in SVG using variables as follows: within the symbolo "S1" has 5 objects "ob1" "OB2" "OB3" ...

      when the page is loaded, the object inside the symbolo s1 called ob1 picks up the color of the variable color1, the OB2 takes the color2 so on ..

       

      In Stage I did so:

      color1 = "blue";

      sym.getSymbol ("C-Bi") $ ("zoze") css ("color", color1)..;

       

      As I do now so that when I click on the red button the variable color1 pass to be red and update my object ??

      I'm trying so, but is not working:

       

      var color = sym.getVariable ("color1");

      color1 = "green";

       

      Sorry I am new to javascript and probably this question is very basic !!