Wave

Code Actionscript 2.0

Frame action

createEmptyMovieClip("drawing", 1);
onEnterFrame = function () {
drawing.lineStyle(1, 0x000000, 100);
drawing.moveTo(_xmouse / 2, 400);
drawing.lineTo(_xmouse, _ymouse);
drawing.lineStyle(1, 0x000000, 40);
drawing.moveTo(_xmouse / 2, 0);
drawing.lineTo(_xmouse, _ymouse);
};
onMouseDown = function () {
drawing.clear();
};

Code Actionscript 3.0

addEventListener(Event.ENTER_FRAME, enterFrame); stage.addEventListener(MouseEvent.MOUSE_DOWN, press); var drawing:MovieClip = new MovieClip(); this.addChild(drawing); function enterFrame(e:Event) { drawing.graphics.lineStyle(1, 0x000000, 1); drawing.graphics.moveTo(mouseX / 2, 400); drawing.graphics.lineTo(mouseX, mouseY); drawing.graphics.lineStyle(1, 0x000000, 40); drawing.graphics.moveTo(mouseX / 2, 0); drawing.graphics.lineTo(mouseX, mouseY); } function press(e:MouseEvent) { drawing.graphics.clear(); }

Description

This is a variation of a simple drawing program. The lines are not drawn directly, but from the top and bottom edge of the screen. The user drawing an angled line. Thus the precise computer generated lines meet with the free drawing motions of the human user.

Download

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


Share