public function Motion() { trace("Motion class instantiated"); addEventListener(Event.ENTER_FRAME, update); } private function updatePosition():void { this.x++; this.y++; } private function update(evtObj:Event):void { this.updatePosition(); }
} }
Related Scripts with Example Source Code in same category :