0 Replies Latest reply on Apr 28, 2015 8:14 PM by Keysaw

    Lazy Line Painter in Edge Animate

    Keysaw

      Hello,

       

      I'm trying to achieve something pretty simple, but it's not working for now...

       

      I would like to trace a SVG dynamically, by code. To do that, I used Lazy Line Painter, which seamed to be pretty easy to use.

       

      So I made my SVG, imported it to Lazy Line, and then paste the code into Edge Animate. But this is where it stops...

       

      First, I integrated the script needed into Edge Animate (jquery.lazylinepainter-1.5.1.min & jquery-2.1.1.min), and then I've past the code from Lazy Line to the CompositionReady of the stage. But it's not working, so I guess there is something to change in the code. Does somebody has an idea to make it possible?

       

      Thank you very much for your help, if you can help me with that it will be wonderful!

       

      Here is my code in the CompositionReady:

       

      /* 
       * Lazy Line Painter - Path Object 
       * Generated using 'SVG to Lazy Line Converter'
       * 
       * http://lazylinepainter.info 
       * Copyright 2013, Cam O'Connell  
       *  
       */ 
      
      var pathObj = {
          "SN_Logos": {
              "strokepath": [
                  {
                      "path": "M135.01,492.361c-2.76-24.965-5.249-63.257,1.095-90.517C141.835,377.223,173.106,245,173.106,245    s-9.441-18.897-9.441-46.841c0-43.874,25.432-76.629,57.095-76.629c26.92,0,39.924,20.213,39.924,44.447    c0,27.072-17.236,67.549-26.134,105.055c-7.432,31.413,15.751,57.027,46.726,57.027c56.085,0,99.192-59.14,99.192-144.497    c0-75.548-54.284-128.371-131.802-128.371c-89.779,0-142.476,67.342-142.476,136.932c0,27.12,10.447,56.2,23.482,72.008    c2.577,3.126,2.954,5.863,2.187,9.047c-2.393,9.972-7.717,31.406-8.761,35.79c-1.377,5.775-4.575,6.999-10.553,4.218    c-39.411-18.348-64.049-75.965-64.049-122.24c0-99.535,72.32-190.945,208.485-190.945c109.456,0,194.522,77.996,194.522,182.237    c0,108.748-68.566,196.265-163.733,196.265c-31.976,0-62.032-16.611-72.32-36.234c0,0-15.822,60.249-19.656,75.009    c-7.128,27.406-26.358,61.761-39.222,82.719",
                      "duration": 1800
                  }
              ],
              "dimensions": {
                  "width": 500,
                  "height": 500
              }
          }
      }; 
      
      
      /* 
       Setup and Paint your lazyline! 
       */ 
      
       $(document).ready(function(){ 
       $('#undefined').lazylinepainter( 
       {
          "svgData": pathObj,
          "strokeWidth": 2,
          "strokeColor": "#e09b99"
      }).lazylinepainter('paint'); 
       });