Start the Flash program. Click "New" from the File menu on the main Flash menu bar. Click the ActionScript 3.0 file type from the New Document dialog box that appears. Click the "OK" button to close this dialog box.
Select the "Actions" option from the "Window" menu on the main Flash menu bar to open the Actions editor. Position your mouse cursor on the first line in the Actions editor.
Type the code below in the first line of the Actions editor to declare a shape object named firstShape.
var firstShape:Shape = new Shape();
Type the code below in the next line of the Actions editor to set the line width to draw the graphic to be added to the firstShape. The 1 indicates a 1-pixel line width).
firstShape.graphics.lineStyle(1);
Type the code below in the next line of the Actions editor so that the graphic added to the "firstShape" object will be filled with the color defined by the hexadecimal code 0000FF (blue).
firstShape.graphics.beginFill(0x0000FF);
Type the code below in the next line of the Actions editor to set the position and dimensions (x, y, width and height) of an ellipse (an oval) that will be added to the firstShape (x, y of 100, 100, width of 50 pixels, height of 100 pixels).
firstShape.graphics.drawEllipse(100, 100, 50, 100);
Type in the code below in the next line of the Actions editor to stop coloring the ellipse.
firstShape.graphics.endFill();
Type in the code below in the next line of the Actions editor to place the ellipse on the stage
addChild(firstShape);
Click the "TestMovie" option in the Control menu on the main Flash menu bar to play the animation. Observe that a blue ellipse is on the screen at the position you specified in the drawEllipse method with the color you specified with the beginFill method.