attachMovie & depths
I wanbt to be able to create buttons inside dNumHolder_mc everytime loadVars return its value (Each time the number of buttons varie). I used removeMovieClip() to remove the current buttons and tried to recreate the next set of buttons. I believe the issue is due to the depths. But with my code the buttons are created once only. How can recreate buttons eachtime btnsRceLoad receives data?
btnsRceLoad.onData = function(src) {
_root.uusersNow.text = "Total Pages: " + src;
for(var i:Number=0; i<src; i++){
_root.dNumHolder_mc.attachMovie("btnNum","numberBtn"+i,_root.dNumHolder_mc.getNextHighestDepth());
_root.dNumHolder_mc["numberBtn"+i]._x = xNumPosition;
_root.dNumHolder_mc["numberBtn"+i]._y = yNumPosition;
_root.dNumHolder_mc.attachMovie("txtNum","textBtn"+i,_root.dNumHolder_mc.getNextHighestDepth());
_root.dNumHolder_mc["textBtn"+i]._x = xNumPosition;
_root.dNumHolder_mc["textBtn"+i]._y = yNumPosition;
_root.dNumHolder_mc["textBtn"+i].theNum.text = BtnNumz;
xNumPosition = xNumPosition + 24.1;
BtnNumz = (BtnNumz + 1);
}