Flash Video Player

Drawing polygons

by admin on October 30, 2007 · 0 comments

in Drawing with Actionscript 3, Flash CS3, Tutorials

Greetings to all!

I created an Actionscript 3.0 class which allows to draw polygons.
Other then the practical use of it, this class is purely educational. It is a good example for those of you who wants to learn OOP programming and read the Actionscript 3.0 tutorials of FlepStudio .

As any class, it has its proper methods and events:

Methods:
drawPolygon(radius:int,segments:int,centerX:Number ,centerY:Number,tint:uint,line:int,rotating:Number );
radius is the dimension of the polygon
segments are the segment numbers in the polygon
centerX and centerY are the coordinates where I want the polygon to be drawn
tint is the colour of the polygon
line is the thickness of the drawing line
rotating is to rotate the polygon

fadeIn();
performs a fade/in of the polygon

fadeOut();
performs a fade/out of the polygon

Eventi:
‘fadeInDone’ , is returned when the method fadeIN is completed
‘fadeOutDone’ is returned when the method fadeOUT is completed

Let us look at a few examples…

Read more

Share This Post

Related posts

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

Older post: Using NumericStepper

Newer post: MOUSE_MOVE effect