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…










{ 0 comments… add one now }