Task 3

Karilyn Kanady

Please install the Flash Player from Adobe to view this content.
Get Adobe Flash player

After starting to execute a couple different ideas, drawing lines using AS3 reminded me of using an Etch-a-sketch as a kid. So I decided to play off of that concept and create an Etch-a-sketch.

I started by adding code to state what classes I wanted flash to use:
import flash.display.Graphics;
import flash.display.Shape;

I then created multiple variables of the Shape class and told Flash to place them on stage by using the "addChild" method.
addChild(display);

I gave the different shapes various line styles and then began to draw on stage using different methods of the Graphics Class:
//windows upstairs
etch.graphics.drawRect(120, 200, 30, 30);
etch.graphics.drawRect(175, 200, 30, 30);

Drawing the car was very much like an Etch-a-sketch
//Car
etch.graphics.moveTo(250, 310);
etch.graphics.lineTo(250, 290);
etch.graphics.lineTo(265, 285);
etch.graphics.lineTo(275, 265);
etch.graphics.lineTo(330, 265);
etch.graphics.lineTo(340, 285);
etch.graphics.lineTo(370, 290);
etch.graphics.lineTo(370, 310);
etch.graphics.lineTo(250, 310);