Need some help here...the code above add a MC to the Scrollpane (which is a MC with a scroll)..anyway i wish to dynamically add new MC's (the base) to this scrollpane upon pressing a button without remove the previous ones.
I dont get the update or invalidate methods becuase what the code below does, it that it indeed add the new MC and expand the scollpane, but at the same time remove the previous added MC's. i did this code in As2 and it worked great when using getNextDepth but i am quite sure that with addChild there is no such thing...anyway .i tried doing like this
adder.addEventListener("mouseDown", changeIt);
var ypos:int;
function changeIt(cb:Object) {
for (var i=0;i<3;id++) {
var abox:MovieClip = new MovieClip();
var it:base = new base();
abox.name = "box"+i;
ypos +=20
abox.y = (ypos*i);
addChild(abox);
abox.addChild(it);
if (i==2){
var aNewBox:MovieClip = new MovieClip();
for (var ik=0;ik<2;ik++) {
aNewBox.addChild(getChildByName("box"+ik))
myScrollPane.source= aNewBox
myScrollPane.update()
}
}
}
any ideas...just seeing the code..i do understand why it happends becuse a New Box..just change the Coordinates and then send it to scrollpane

Will addChildAt help me something ?