4 Replies Latest reply on Jan 22, 2015 3:57 AM by Volkan01

    Using JSON in Edge Animate

    Volkan01

      Hello together,

       

      i am trying to use JSON in Edge Animate.

      My aim is to put all the texts and images from Edge Animate in a JSON file.

       

      The textfile looks like:

       

      var JSONObject=

      {

          //Page Text

          "text": "hello",

          "image": {

          "src": "images/test.png"

          }

         

      };

         

      There is no problem with reading the text from the file:

      sym.setVariable("text",JSONObject.text);

      sym.$("text").html(sym.getVariable("text"));

       

       

      But it doesn´t work with loading the image. I tried everything like

       

      sym.setVariable("image",JSONObject.image.src);

      sym.$("test_image").css({'background', sym.getVariable('image')});

       

      but no chance. Can anyone help me?