Moving clip

hi my class code is

package A
{
import flash.display.MovieClip;
import flash.events.Event;
public class Mover extends MovieClip
{
private var targetMC:MovieClip;
public function Mover(targetMC:MovieClip)
{
this.targetMC = targetMC;
}
private function updatePosition(evtObj:Event):void
{
this.targetMC. x++;
this. targetMC.y++;
}
public function startMoving():void
{
this.targetMC.addEventListener(Event.ENTER_FRAME, this.updatePosition);
}
public function stopMoving():void
{
this.targetMC.removeEventListener(Event.ENTER_FRAME, this.updatePosition);
}
}
}

and in my Fla i had writen
var circleMover:Mover = new Mover(circle);

circleMover.startMoving();

but the error i am getting is
ArgumentError: Error #1063: Argument count mismatch on A::Mover$iinit(). Expected 1, got 0.

any help

yes

Thats the problem, create new documentClass without any parameters passed into constructor

well is this the problem plz write the solution

^ That is the solution, you can’t have parameters in the constructor of a document class.

If u really want to have things like they are

public function Mover(targetMC:MovieClip=null)

[quote=Felixz;2330515]If u really want to have things like they are ActionScript Code:
[LEFT][COLOR=#0000FF]public[/COLOR] [COLOR=#000000]function[/COLOR] MoverCOLOR=#000000[/COLOR]
[/LEFT]

[/quote]

i tried and got this error
Error: Error #2136: The SWF file file:///G|/eman%20rnd/class/test.swf contains invalid data.
at Main/::frame1()

it would help to say what line of code the error is pointing at instead of showing a whole page and have us guess.

the error suggests that one of your functions is expecting a parameter but is not getting it. is “circle” a movieclip you already created and added?