ลองเอาพื้นฐานการวาดเส้น fill มาลองให้เอาไปศึกษากานฮะ
[hide=1]
Code:
function drawObject() {
    var Stage_width = Stage.width;
    var Stage_height = Stage.height;
    var randX = Math.round(Math.random()*Stage_width);
    var randY = Math.round(Math.random()*Stage_height);
    var randAlpha = Math.round(Math.random()*100);
    var randColor = Math.round(Math.random()*255);
    var colorTone = 0xFF00FF;
    var Size = 30;
    var newColor = randColor*colorTone;
    ////////////////// draw /////////////////
    for (var i = 1; i<10; i++) {
        _root.createEmptyMovieClip("mc"+i,this.getNextHighestDepth());
        ["mc"+i]
        lineStyle(0,newColor,100);
        ["mc"+i]
        moveTo(randX,randY);
        ["mc"+i]
        beginFill(newColor,randAlpha);
        ["mc"+i]
        lineTo(randX+Size,randY);
        ["mc"+i]
        lineTo(randX+Size,randY+Size);
        ["mc"+i]
        lineTo(randX,randY+Size);
        ["mc"+i]
        lineTo(randX,randY);
        ["mc"+i]
        endFill();
        //removeMovieClip(["mc"+i]);
    }


}
setInterval(drawObject,50);