package { import flash.display.*; import flash.events.*; import mx.core.UIComponent; import mx.controls.Alert; public class Automobiil extends UIComponent { protected var rattad:Array=new Array() private var kere:MovieClip=new MovieClip(); private var rattanurk:Number=0; public var nurgamuutus:Number=1; public function Automobiil(){ addEventListener(Event.ENTER_FRAME, liigu); rattad[0]=new Ratas(); rattad[1]=new Ratas(); var g:Graphics=kere.graphics; g.lineStyle(15, 0X000000); g.moveTo(80, 0); g.lineTo(120, 0); g.endFill(); addChild(kere); addChild(rattad[0]); addChild(rattad[1]); rattad[1].x=200; } private function liigu(e:Event):void{ rattanurk+=nurgamuutus; kere.x+=nurgamuutus; for(var i:Number=0; i