Hi guys, lately i find myself going thru a recursion phase and im assuming recursion has it good points and bad points at it does in o-o programming.
i try to keep my recursion functions small but i dont know if i should go back and rewrite them bottom-up style.
im used to writing recursive functions just for small things but lately i just been seeing how far i can go with this lol.
for example, i’ll write a recursive function along these lines:
j=totalCalculatedSomewhere;
function attachBoxes(j){
if(j >=0){
mymc.onEnterFrame=NULL;
depth=mymc.getNextHighestDepth();
holder= mymc.attachMovieClip(“box”,“box”+j,depth);
mymc.onEnterFrame=function(){
atween = new mx.transitions.etc.etc.
}
attachBoxes(j-1);
}
}
so, any comments on the good and bad of recursion in AS?