# Filters and onEnterFrame problem

**URL:** <https://forum.kirupa.com/t/filters-and-onenterframe-problem/181802>\
**Category:** Uncategorized\
**Created:** [March 13, 2006, 7:00am UTC](https://forum.kirupa.com/t/filters-and-onenterframe-problem/181802 "2006-03-13T07:00:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kritikal](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kritikal/32/1699_2.png) [@kritikal](https://forum.kirupa.com/u/kritikal)\
**Post date:** [March 13, 2006, 7:00am UTC](https://forum.kirupa.com/t/filters-and-onenterframe-problem/181802/1 "2006-03-13T07:00:28Z")

</div>

hey guys,

here’s the thing, I have 4 buttons and when you rollover on them they “lift” and I have an onEnterFrame that will create a dropShadow and gets more and more blurry as the button gets lifted. I have another onEnterFrame that will do the opposite of the other one and also has a delete onEnterFrame.

My problem is that since every button has an onEnterFrame on rollover and rollout, when you move the mouse on all 4 the only one that the delete onEnterFrame works is the last button that was rolled out…

Don’t know if I’m clear so here’s an example

```auto

//on rollover
ds.alpha = 5;
    iconsMC.icons1.filters = [ds];
    onEnterFrame = function() {
        ds.blurX += (20-ds.blurX)/5;
        ds.blurY = ds.blurX;
        //trace(ds.blurY);
        ds.distance += 0.5;
        iconsMC.icons1.filters = [ds];
        if(ds.blurX > 18.5) {
            delete this.onEnterFrame;
        }
        if(ds.distance > 7.5) {
            delete this.onEnterFrame;
        }
    }[FONT=Courier New][/FONT]
 //on rollout
onEnterFrame = function() {
        ds.blurX --;
        ds.blurY = ds.blurX;
        ds.distance -= 0.3;
        trace(ds.distance);
        iconsMC.icons1.filters = [ds];        
        if(ds.distance < 2) {
            delete this.onEnterFrame;
            iconsMC.icons1.filters = [0];
            
        }
    }

```

So every button has that for the filters. Is there any way I can make the rollout onEnterFrame finish while the next rollover starts??

any help would be greatly appreciated!
