Set and degrade blur

hey all - working on putting a blur on a version of the content scrollbar (when the content moves - its blurred).

so i basically have something like this (simplified):


contentMc.onEnterFrame = function() {
     if(newY - y ==)) {
            //basically - if content is moving
            setBlur()
     } else {
             //if content is not moving
             clearBlur()
     }
}

my question is - since that function is being called on every frame - how can i remove the blur (i also want to just degrade the blur - so from a blurX of 5 down to 4, 3, 2, 1, 0) without it being screwed up because it is called all the tiem?

I can’t just delete the contentMC.onEnterFrame either.

Thanks :slight_smile: