# Help! 256 levels of recursion

**URL:** <https://forum.kirupa.com/t/help-256-levels-of-recursion/129471>\
**Category:** Uncategorized\
**Created:** [November 24, 2004, 2:49am UTC](https://forum.kirupa.com/t/help-256-levels-of-recursion/129471 "2004-11-24T02:49:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bless](https://avatars.discourse-cdn.com/v4/letter/b/34f0e0/32.png) [@Bless](https://forum.kirupa.com/u/Bless)\
**Post date:** [November 24, 2004, 2:49am UTC](https://forum.kirupa.com/t/help-256-levels-of-recursion/129471/1 "2004-11-24T02:49:34Z")

</div>

Hi. I keep experiencing the error message “256 levels of recursion” in my flash movie. Can someone have a look at the code I’m using and identify what is causing this? Forgive me for posting lots of code, but there are three possible culprits. I’ll post them seperately in different threads. Thanks…😉

> // Actions for buttons  
> btn1\_btn.onRelease = function() {  
> loadThenGrow(“kuz images/kuzpical1.jpg”);  
> };  
> btn2\_btn.onRelease = function() {  
> loadThenGrow(“kuz images/kuzpical2.jpg”);  
> };  
> btn3\_btn.onRelease = function() {  
> loadThenGrow(“kuz images/kuzpical3.jpg”);  
> };  
> btn4\_btn.onRelease = function() {  
> loadThenGrow(“kuz images/kuzpical4.jpg”);  
> };  
> btn5\_btn.onRelease = function() {  
> loadThenGrow(“kuz images/kuzpical6.jpg”);  
> };  
> btn6\_btn.onRelease = function() {  
> loadThenGrow(“kuz images/kuzpical7.jpg”);  
> };  
> btn7\_btn.onRelease = function() {  
> loadThenGrow(“kuz images/kuzpical8.jpg”);  
> };  
> btn8\_btn.onRelease = function() {  
> loadThenGrow(“kuz images/kuzpical9.jpg”);  
> };  
> btn9\_btn.onRelease = function() {  
> loadThenGrow(“kuz images/kuzpical11.jpg”);  
> };  
> function loadThenGrow(img) {  
> bg\_square\_mc.\_parent.holder\_mc.removeMovieClip();  
> bg\_square\_mc.\_parent.createEmptyMovieClip(“holder\_mc”, 1);  
> bg\_square\_mc.\_parent.holder\_mc.\_visible = false;  
> bg\_square\_mc.\_parent.holder\_mc.onData = function() {  
> if (this.getBytesLoaded() == this.getBytesTotal()) {  
> this.\_visible = false;  
> w = this.\_width;  
> h = this.\_height;  
> bg\_square\_mc.growTo(w+2, h+2, 10,showHolder);  
> }  
> };  
> bg\_square\_mc.\_parent.holder\_mc.loadMovie(img);  
> }  
> function showHolder() {  
> w = bg\_square\_mc.\_parent.holder\_mc.\_width;  
> h = bg\_square\_mc.\_parent.holder\_mc.\_height;  
> bg\_square\_mc.\_parent.holder\_mc.\_x = bg\_square\_mc.\_x-w/2;  
> bg\_square\_mc.\_parent.holder\_mc.\_y = bg\_square\_mc.\_y-h/2;  
> bg\_square\_mc.\_parent.holder\_mc.\_visible = true;  
> bg\_square\_mc.\_parent.holder\_mc.\_alpha = 0;  
> bg\_square\_mc.\_parent.holder\_mc.fadeTo(5, \_root.doneHolder);

}  
MovieClip.prototype.fadeTo = function(fadeRate, callback) {  
if ((fadeRate == undefined) or (fadeRate\<=0)) {  
fadeRate = 10;  
}  
if (!this.fading) {  
this.fading = true;  
this.fadeInterval = setInterval(this, “doFadeTo”, 60, fadeRate, callback);  
}  
};  
MovieClip.prototype.doFadeTo = function(fadeRate, callback) {  
if (this.\_alpha \> 100) {

clearInterval(this.fadeInterval);  
this.fading = false;  
if (callback) {  
callback();  
}  
} else {  
this.\_alpha += fadeRate;  
}  
};
