# Dynamically Removing Filters

**URL:** <https://forum.kirupa.com/t/dynamically-removing-filters/324125>\
**Category:** flash\
**Created:** [August 3, 2011, 4:37pm UTC](https://forum.kirupa.com/t/dynamically-removing-filters/324125 "2011-08-03T16:37:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rinkusu](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@Rinkusu](https://forum.kirupa.com/u/Rinkusu)\
**Post date:** [August 3, 2011, 4:37pm UTC](https://forum.kirupa.com/t/dynamically-removing-filters/324125/1 "2011-08-03T16:37:28Z")

</div>

Basically, the effect I’m going for is, you click on a button that calls an mc to the stage and blurs everything below it. Within that mc is a button that when clicked, should remove both the mc and the blur filter.

This is the code I have. (Also, just ignore my stupid function names. I pretty much just name them after the next word I hear in the song I’m listening to 🙂

Main Timeline:

```auto
hint.addEventListener(MouseEvent.CLICK,manipulation);
function manipulation(event:MouseEvent){
    this.addChild(newHint);
    newHint.x = 121;
    newHint.y = 78;
    
    var i:int = this.numChildren - 5;
    while(i > 0){
        i--;
        this.getChildAt(i).filters = BLUR;
    }
}

```

Symbol Definition:

```auto
X.addEventListener(MouseEvent.CLICK, main);
function main(event:MouseEvent):void {
    MovieClip(root).removeChild(this);
    var i:int = this.numChildren - 5;
    while(i > 0){
        i--;
        this.getChildAt(i).filters = [];
    }
}
 

```

Everything works perfectly except for

```auto
var i:int = this.numChildren - 5;
while(i > 0){
i--;
        
this.getChildAt(i).filters = [];
}

```

and I don’t have any compiler errors, the stuff just simply won’t unblur. Does anyone have any idea how to do this?
