Hi!
I have made an class for applying ColorMatrixFilter on MovieClip. The structure of the class is as follow:
// Init variables
// Constructor
// Methods
From my application I create a new instance and call for a function in the class with an setInterval:
setInterval(filter.setBrightness, 40, this);
The problem is that the variables I declared in the constructor is undefined within the functions. If I use
setInterval(filter.setBrightness(), 40, this);
instead the variables is defined but the interval will not update at every 40ms. It just run once. This can be solved if all variables is placed inside the function but then I think the class structure losing it´s meaning.
Any proposals?!