I was looking at some code I did recently and I solve the problem like this:
import mx.controls.*
import mx.data.components.*;
class MyContainerClass extends mx.core.UIObject{
private var template_cb : ComboBox;
private var startDate_df : DateField;
public function MyContainerClass{
this.createClassObject(mx.controls.DateField, "startDate_df", this.getNextHighestDepth());
startDate_df.move(725, 2);
...
this.createClassObject(mx.controls.ComboBox, "template_cb", this.getNextHighestDepth());
template_cb.setSize(250, 22);
template_cb.move(70, 66);
}
}
By having your container extend the mx.core.UIObject class you have access to the createClassObject Method which seems to work much better than instancing the components using the attachMovie method.
Hope that helps