Being a bit new to AS3 I just cant figure this one out on my own even though I’ve look at some discutions at different forums but I dont quite get it
My problem is that getTourData(); kicks in too early and I dont want to use a timer 'cus I dont know how long removeAllMyChildren is going to take since it may be large sometimes. Give me a hint please, which way to go
AS3
// years down
this.arrowbtnMC.yearsBtnsMC.topArrDwnMC.addEventListener ('click', function() {;
if (startYear==yearArr) {
yearArr--;
removeAllMyChildren();
// when done removeAllMyChildren; do getTourData
getTourData(yearArr);
};
});
function removeAllMyChildren(){
while (textMoverMC.numChildren) {
textMoverMC.removeChildAt(0);
}
while (compNameMoverMC.numChildren) {
compNameMoverMC.removeChildAt(0);
}
}