Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package opdrachten.punten
- {
- import flash.display.Sprite;
- import flash.events.Event;
- import wiskunde.Punt;
- /**
- * ...
- * @author
- */
- public class Smiley extends Sprite
- {
- public var oog1:Punt = new Punt(200, 200, 50, 0xffffff,true);
- public var oog2:Punt = new Punt(400, 200, 50, 0xffffff,true);
- public var neus1:Punt = new Punt(200, 210, 25, 0x000000,true);
- public var neus2:Punt = new Punt(400, 210, 25, 0x000000,true);
- public var m1:Punt = new Punt(200, 450, 10, 0xffffff,true);
- public var m3:Punt = new Punt(400, 450, 10, 0xffffff,true);
- public var m2:Punt = new Punt(300, 400, 10, 0xffffff,true);
- public function Smiley()
- {
- addChild(oog1);
- addChild(oog2);
- addChild(neus1);
- addChild(neus2);
- addChild(m1);
- addChild(m2);
- addChild(m3);
- addEventListener(Event.ENTER_FRAME, loop)
- }
- private function loop(e:Event):void
- {
- this.graphics.clear;
- this.graphics.lineStyle(1);
- this.graphics.beginFill(0xffff00);
- this.graphics.drawCircle(300, 300, 250);
- this.graphics.endFill();
- this.graphics.lineStyle(10, 0x000000);
- this.graphics.moveTo(m1.x, m1.y);
- this.graphics.curveTo(m2.x, m2.y, m3.x, m3.y);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment