Home / Tutorials / Drawing / Drawing API /

Flash Tutorials

Drawing API - Page 2

Posted by : webzo on Mar 18, 2008

 

5.0/5

If you want to erase the square call clear().

To draw a square filled with black:

_root.createEmptyMovieClip("dBoard",1); 
dBoard.beginFill(0, 100);
dBoard.moveTo(80, 80);
dBoard.lineTo(110,80);
dBoard.lineTo(110,110); 
dBoard.lineTo(80,110);
dBoard.lineTo(80,80);
dBoard.endFill();

Draw a curve:

_root.createEmptyMovieClip("dBoard",1);
dBoard.lineStyle(1,0,100);
dBoard.moveTo(130,130)
dBoard.curveTo(180,180,130,230);

This is every thing you need to know about the drawing in actionscript, with these functions you can draw almost everything.

no comment

Add comment

Please login to post comments.