Hello, everybody
This is my first meeting with the Shapes; which don’t seem cooperating, at all. Following is the Class code:
package
{
import flash.display.Shape;
import flash.display.MovieClip;
public class TestShape extends MovieClip
{
private var _centerX: int;
private var _centerY: int;
private var _radius: uint = 100;
private var _thickness: uint = 5;
public function TestShape(centerX: Number, centerY: Number,
radius: uint, thickness: uint): void
{
_centerX = centerX;
_centerY = centerY;
_radius = radius;
_thickness = thickness;
drawCircle();
}
function drawCircle(): void
{
graphics.lineStyle (_thickness, 0x000000);
graphics.beginFill (0xFFFFFF);
graphics.drawCircle(_centerX, _centerY, _radius);
graphics.endFill();
}
}
}
And following is my FLA code:
import TestShape;
var centerX: Number;
var centerY: Number;
var radius: uint = 100;
var thickness: uint = 5;
centerX = centerY = radius + 10;
var shape: TestShape = new TestShape(centerX, centerY, radius, thickness);
Would anybody let me know, how to convince my class to do the job, please!