Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.18 / 5.00 3,534 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.80 / 5.00 4,200 ViewsBasically, the effect I'm going for is, you click on a button that calls an mc to the stage and blurs everything below it. When you click another button (that was also called), that mc (and button) is removed, as well as the blur filter.
I have this for the filter:
var BLUR:Array = [new BlurFilter(16, 16, 1)];
var i:int = this.numChildren - 5;
while(i > 0){
i--;
this.getChildAt(i).filters = BLUR;
}
I thought copying it and changing the last line to
this.getChildAt(i).filters = [];
would work, but, well, I wouldn't be here if it did...
Does anyone know how to do this? Thanks in advance.
Intellectually Questionable? You decide.
http://icodesnip.com/search/as3%20image%
20filters/
That has somethings about blurring the stage in it.
Also try tutcity below.
Well, the blur is already successful. I can get the background stuff to blur. I just can't get it to unblur...
Intellectually Questionable? You decide.
http://flashexplained.com/actionscript/a pplying-the-blur-filter-to-buttons-via-a ctionscript/
That should help. One of the chapters is how to remove the blur from your stage.
Well, that's just telling me to use filters = null; which is what I already have and what isn't working.
This is all relevant code I have; maybe someone can detect a problem. (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 :\)
hint.addEventListener(MouseEvent.CLICK,manipulation);
function manipulation(event:MouseEvent){
this.addChild(newHint);
newHint.x = 121;
newHint.y = 78;
this.addChild(newX);
newX.x = 350.9;
newX.y = 100.0;
var i:int = this.numChildren - 5;
while(i > 0){
i--;
this.getChildAt(i).filters = BLUR;
}
newX.addEventListener(MouseEvent.CLICK,traumst);
function traumst(event:MouseEvent){
removeChild(newHint);
removeChild(newX);
var i:int = this.numChildren - 5;
while(i > 0){
i--;
this.getChildAt(i).filters = [];
}
}
}
Everything works perfectly except
var i:int = this.numChildren - 5;
while(i > 0){
i--;
this.getChildAt(i).filters = [];
and I have no compiler errors, the blur just simply doesn't go away when "newX" is pressed.
Intellectually Questionable? You decide.