Hello all. I have a small problem here and I cannot figure it out for much that I look elsewhere so your help here would be great. I have some text fields inside movieClips that act as buttons. I have some functionality added on mouse over, a color tint is made over the movieClip. I wonder why when I do mouse over the text becomes thinner and uglier.
The code here:
package {
import flash.display.MovieClip;
import flash.text.TextField;
import flash.text.*;
import gs.*;
import flash.events.MouseEvent;
public class Menu extends MovieClip {
private var t1:TextField=new TextField ;
private var t2:TextField=new TextField ;
private var t3:TextField=new TextField ;
private var t4:TextField=new TextField ;
private var m1:MovieClip=new MovieClip ;
private var m2:MovieClip=new MovieClip ;
private var m3:MovieClip=new MovieClip ;
private var m4:MovieClip=new MovieClip ;
var currentButton:MovieClip=null;
var texts:Array=new Array(t1,t2,t3,t4);
var movies:Array=new Array(m1,m2,m3,m4);
public function Menu() {
var myFormatt:TextFormat = new TextFormat();
myFormatt.size=12;
myFormatt.align="center";
myFormatt.color=0xFFFFFF;
myFormatt.font="Arial";
t1.text="PORTFOLIO";
t2.text="INFO";
t3.text="NOTICIAS";
t4.text="CONTACTO";
for (var i:int = 0; i<4; i++) {
texts*.setTextFormat(myFormatt);
addChild(movies*);
movies*.addChild(texts*);
texts*.selectable=false;
texts*.height=20;
movies*.height=20;
movies*.buttonMode=true;
movies*.mouseChildren=false;
movies*.width=texts*.textWidth+20;
movies[0].x=275;
if (i>0) {
movies*.x = (movies[i-1].x + movies[i-1].width + 20 );
}
movies*.y=375;
movies*.addEventListener(MouseEvent.MOUSE_OVER, over);
movies*.addEventListener(MouseEvent.MOUSE_OUT, out);
}
function over(evt:MouseEvent):void {
currentButton=MovieClip(evt.currentTarget);
TweenFilterLite.to(currentButton, 1, {colorMatrixFilter:{colorize:0x0098ff, amount:0.3, brightness:1.1}});
}
function out(evt:MouseEvent):void {
currentButton=MovieClip(evt.currentTarget);
TweenFilterLite.to(currentButton, 0.5, {colorMatrixFilter:{amount:0}});
}
}
}
}
As always thank you for your support!
Andres.