I want to set mousemove effect over the button , when someone move mouse over button text should be bold
How to do it?
I want to set mousemove effect over the button , when someone move mouse over button text should be bold
How to do it?
It's very simple.
myButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOvers);
myButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOuts);
function mouseOvers(e:MouseEvent):void
{
}
Ooops, it's not overall.
Try this.
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFormat;
myButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOvers);
myButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOuts);
function mouseOvers(e:MouseEvent):void
{
var txtFormat = new TextFormat();
txtFormat.bold = true;
e.currentTarget.txt.setTextFormat(txtFormat);
}
function mouseOuts(e:MouseEvent):void
{
var txtFormat = new TextFormat();
txtFormat.bold = false;
e.currentTarget.txt.setTextFormat(txtFormat);
}
thanks
you
thanks for the code ...............................
Bookmarks