# Controlling 'Blur' from within a class

**URL:** <https://forum.kirupa.com/t/controlling-blur-from-within-a-class/178649>\
**Category:** flash\
**Created:** [February 13, 2006, 2:18am UTC](https://forum.kirupa.com/t/controlling-blur-from-within-a-class/178649 "2006-02-13T02:18:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ayman](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@Ayman](https://forum.kirupa.com/u/Ayman)\
**Post date:** [February 13, 2006, 2:18am UTC](https://forum.kirupa.com/t/controlling-blur-from-within-a-class/178649/1 "2006-02-13T02:18:34Z")

</div>

I am trying to control ‘blur’ from within a movieclip’s class. But I don’t know why it doesn’t do so. I can do everything from within that class (control textfield’s caption names,etc) but I just can’t blur it , using the BlurFilter class. Here is my short code. Is there any problem in doing this from a class? I tried the code on the movieclip directly without using classes and it worked… so it’s strange.

Can you spot the problem?

```auto

import flash.filters.BlurFilter;

dynamic class txtField{
 
 var xTip:Number = 0.3
 var yTip:Number = 0.3
 
 public function txtField()
 {
  _alpha = 0;
 }
 
 function onLoad()
 {
  this.name = "pop"
   
  var blurX:Number = 70;
  var blurY:Number = 70;
  var quality:Number = 43;
  
  var filter:BlurFilter = new BlurFilter(blurX, blurY, quality);
  var filterArray:Array = new Array(filter);
  filterArray.push(filter);
  this.filters = filterArray;
  trace(this.filters)   
 }
 
 
 function onEnterFrame()
 {
  _x+= xTip
  _y+= yTip
  _alpha += 2
 }
}

```
