I am not sure this as much a problem as I am probably doing something wrong. I am adding child components at runtime to a vbox. These new components can be dragged to a new position. This all works. The 'problem' is that when anytime a new child is added, all the child components move the top left corner of the container they are added to.
Code Below:
public function creatObj(what:String):void{
var obj:UIComponent;
switch(what){
case "rssFirstName":
obj = new textComponent;
//container_vb.addChild(obj);
break;
case "rssLastName":
obj = new textComponent;
//container_vb.addChild(obj);
break;
case "rssEmail":
break;
case "text":
obj = new textComponent;
//container_vb.addChild(obj);
break;
case "textArea":
obj = new textAreaComponent;
//container_vb.addChild(obj);
break;
case "checkBox":
obj = new checkboxComponent;
//container_vb.addChild(obj);
break;
default:
break;
}
container_vb.addChild(obj);
}
I really need to figure out why this is happening, so any guidance is
appreciated.
Thanks
--
I am not a diabetic, I have diabetes
my blog - http://grumpee.instantspot.com/blog

