I'm doing a button with two filters that tween in when the user has the cursor over it (Mouse Over) and two more filter tweens when the cursor exits it. Pretty basic stuff.
The filters are Glow and DropShadow. Glow is applied to the text, while DropShadow is applied to the button background (a simple rectangle).
The problem here is that the transition for the GlowIn does not work. It instantly applies the filter at full alpha when the mouse is over it. GlowOut works though.
Though it is set to a 0.25 time, I tried it with full 5 seconds just to be sure, and it still didnt work, so its not a timing issue.
Here is my code:
import caurina.transitions.Tweener;
import caurina.transitions.properties.FilterShortcuts;
import flash.filters.GlowFilter;
FilterShortcuts.init();
texto.mouseEnabled = false;
this.addEventListener(MouseEvent.MOUSE_OVER, FiltersIn);
this.addEventListener(MouseEvent.MOUSE_OUT, FiltersOut);
var glow = new GlowFilter(0xFFFFFF, 0, 5, 5, 3, 250);
texto.filters = [glow];
function FiltersIn(MouseEvent):void{
Tweener.addTween(this, {_DropShadow_distance:5, _DropShadow_alpha:1, _DropShadow_blurX:5, _DropShadow_blurY:5, time:0.25, transition:"easeOutCubic"});
Tweener.addTween(texto, {_Glow_alpha:100, time:0.25, transition:"easeOutCubic"});
}
function FiltersOut(MouseEvent):void{
Tweener.addTween(this, {_DropShadow_distance:0, _DropShadow_alpha:0, _DropShadow_blurX:0, _DropShadow_blurY:0, time:0.25, transition:"EaseInCubic"});
Tweener.addTween(texto, {_Glow_alpha:0, time:0.25, transition:"easeInCubic"});
}