1 Reply Latest reply on Jul 25, 2008 2:01 AM by Karl_Sigiscar_1971

    SVG

    chiabin
      HI may i ask an question for flex?
      can flex generate an svg file?
      or
      use flex to draw SVG
        • 1. Re: SVG
          Karl_Sigiscar_1971 Level 3
          Since SVG is XML based, you can parse a SVG file in Flex. Then you can draw the data using the drawing API:

          import mx.containers.Canvas;

          var myCanvas:Canvas = new Canvas;
          var drawingArea:Graphics = myCanvas.graphics;

          drawingArea.beginFill(0x0000FF, 30);
          drawingArea_mc.lineStyle(5, 0xFF00FF, 100);
          drawingArea_mc.moveTo(200, 200);
          drawingArea_mc.lineTo(300, 300);
          drawingArea_mc.lineTo(100, 300);
          drawingArea_mc.lineTo(200, 200);
          drawingArea_mc.endFill();