A question about ++

hello,

i have one function that returns custom type:

public function addMC():MyCustomClass{

var mc:MyCustomClass = new MyCustomClass();
addChild(MyCustomClass);
mc.name = “mc”+id++;
//id is number initialize in the constructor id = 0;
return mc;

}

my problem is that i want to use addMC inside a loop something like this:

for(var i:int = 0; i<5; i++){
var mc:MyCustomClass = addMC();
}

but the loop creates only one mc

any ideas?

Thanks