PDA

View Full Version : Glowfilter not working on textfiled?



Dimitree
March 23rd, 2010, 06:15 PM
I have four instances of a movieclip (consisted of a textfield) on stage with given names btn1,btn2,btn3,btn4.
The issue is I cannot get the GlowFilter work on ROLL_OVER event Listener.


import com.greensock.*;
import com.greensock.easing.*;

var buttons_array:Array = [btn1,btn2,btn3,btn4];

var previousBtn = MovieClip(buttons_array[0]);
previousBtn.mouseEnabled = false;

TweenMax.to(previousBtn, 0, {tint:0xCAB16F});

for (var i:Number=0; i<buttons_array.length; i++) {
buttons_array[i].id = i;
buttons_array[i].mouseChildren=false;
buttons_array[i].buttonMode=true;
buttons_array[i].addEventListener(MouseEvent.ROLL_OVER, onRollover, false, 0, true);
}
function onRollover(e:MouseEvent):void {
e.target.addEventListener(MouseEvent.ROLL_OUT, onRollout, false, 0, true);
e.target.addEventListener(MouseEvent.CLICK, buttonClicked, false, 0, true);
TweenMax.to(e.target, 1, {glowFilter:{color:0x91e600, alpha:1, blurX:30, blurY:30}});

}
function onRollout(e:MouseEvent):void {
TweenMax.to(e.target, .1, {tint:null});

}
function buttonClicked(e:MouseEvent):void {
var currentBtn = MovieClip(e.target);
previousBtn.addEventListener(MouseEvent.ROLL_OVER, onRollover, false, 0, true);
currentBtn.removeEventListener(MouseEvent.ROLL_OUT , onRollout);
currentBtn.removeEventListener(MouseEvent.CLICK, buttonClicked);
TweenMax.to(currentBtn, .1, { tint:0xCAB16F});
TweenMax.to(previousBtn, .1, {tint:null});
previousBtn.mouseEnabled = true;
currentBtn.mouseEnabled = false;
previousBtn = currentBtn;
}


Can sb see what's wrong?

TheCanadian
March 23rd, 2010, 06:51 PM
Is the font embedded?

Dimitree
March 24th, 2010, 05:45 AM
Is the font embedded?
With your suggestion it works but now on mouse over the font looks kinda chopped on side...
Has this to do sthg with the Glowfilter? When I just "tint" onMouse Over the font looks ok though...
I use antialias for Redability.