Drawing using Code
       by kirupa  |  23 June 2006

Flash has always provided a graphical way of drawing shapes and lines. But, did you know that you can re-create much of the drawing functions using code itself? In this short article I will explain more about how to use the drawing classes to easily draw circles and rectangles easily.

Note

This tutorial is meant to be a revised version of the tutorial created by Ilyas for Flash MX.

First, let's start really simple and re-create the commonly used Rectangle and Circle shapes.

Drawing a Rectangle
The code for drawing a rectangle is provided below:

 

 

 

Onwards to the next page!

1 | 2 | 3 | 4 | 5




SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple.