Start Adobe Flash. Select "Flash" (ActionScript 3.0) below the "Create New" category. Select "Window," then "Workspace," then "Designer" from the main menu. Open up the Action editor. Select "Window," then "Action"
Create a graphic shape object and name it "lineChart." Assign the line properties with the lineStyle method of the graphics class. Assign a line width of 1 pixel, a color of black(9) and opaque(1). Use the moveTo method to make the point (0,0) the first point on the graph.
var lineChart:Shape = new Shape() // Create the line chart shape instance
lineChart.graphics.lineStyle(1, 0, 1) ; // Set the line style properties
lineChart.graphics.moveTo(0,0);
Assign an array to contain the x-coordinates and an array to contain the y-coordinates
var xpoint:Array = new Array(0, 10, 20, 30, 40, 50); //create the xpoint data array
var ypoint:Array = new Array(3, 40, 140, 180, 200, 300); //create the ypoint data array
Use a "for loop" to read in the data in the xpoint and ypoint arrays. A "for loop" allows code to be repeatedly executed. Use the lineTo method of the graphics class to draw the lines of the chart.
for (var i:int = 0; i < xpoint.length ; i ++)
{
lineChart.graphics.lineTo(xpoint[i], ypoint[i])
};
Place the chart on the stage. Use the addChild method.
addChild (lineChart);