1 Reply Latest reply on Aug 4, 2007 10:00 AM by peterent

    drawing api in flex (drawing borad)

      I am working on a drawing app project in AS3. I am newbie to AS3. and flex.

      I have a canvas and I have tools just like in flash.(rectangle, circle, text, line, curve)
      by selecting the tools I want to draw the particular shapes in the canvas.

      please suggest me whether its possible in flex. if yes can anyone please give me some tutorials or links

      and if its not possible. please give me some tutorials links for as3 and even I want a menu component but its not in as3 please suggest me the posiblity for that.

      thanks and regards
        • 1. Re: drawing api in flex (drawing borad)
          peterent Level 2
          I'm not sure about tutorials, but read up on the flash.display.Graphics class. Your Canvas has a graphics property and that's where you draw. Here's how to draw a red circle 50 pixels in diameter:

          graphics.beginFill( 0xff0000 );
          graphics.drawCircle( 100, 100, 25 );

          You should do most of your drawing in the updateDisplayList function - just override it (in a Script block if using MXML).