To remove all vector drawings in an object, we use the Graphics class's instance method clear( ). : Graphics : Graphics Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Graphics » Graphics »

 

To remove all vector drawings in an object, we use the Graphics class's instance method clear( ).


 

package{
  import flash.display.*;
  
  public class Main extends Sprite{
    public function Main(){

        var canvas:Shape = new Shape(  );
        canvas.graphics.lineStyle(30x0000FF);  // Apply blue stroke
        canvas.graphics.lineTo(2535);
        addChild(canvas);
        
        canvas.graphics.clear(  );

    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Graphics
» Graphics