Area

Code Actionscript 2.0

Frame action

createEmptyMovieClip("drawing", 1);
drawing.lineStyle(0, 0x000000, 0);
drawing.beginFill(0x000000, 100);
drawing.moveTo(0, 0);
drawing.lineTo(100, 0);
drawing.lineTo(100, 100);
drawing.lineTo(0, 100);
drawing.endFill();

Code Actionscript 3.0

var drawing:MovieClip = new MovieClip(); drawing.graphics.lineStyle(0, 0x000000, 0); drawing.graphics.beginFill(0x000000, 1); drawing.graphics.moveTo(0, 0); drawing.graphics.lineTo(100, 0); drawing.graphics.lineTo(100, 100); drawing.graphics.lineTo(0, 100); drawing.graphics.endFill(); this.addChild(drawing);

Description

Areas are constructed, by drawing their edges with the lineTo command. The commands beginFill and endFill define the beginning and the end of the shape to be filled.

Download

Right click: Flashfile AS 2.0 | Flashfile AS 3.0 | SWF-File


Share