import flash.text.TextFormat
public var over_style = new TextFormat();
public var out_style = new TextFormat();
over_style.color = 0xFF0000; // Red
out_style.color = 0x0000FF; // Black
mcRolls.rollCount.text = "Hello World";
mcRolls.rollCount.setTextFormat(out_style);
mcRolls.rollCount.mouseEnabled = false; // This allows the hand to show up for dynamic textfields
mcRolls.buttonMode = true;
mcRolls.addEventListener(MouseEvent.MOUSE_OVER, OVER_Handler);
mcRolls.addEventListener(MouseEvent.MOUSE_OUT, OUT_Handler);
function OVER_Handler(e:MouseEvent):void
{
var mc:MovieClip = e.currentTarget as MovieClip;
mc.rollCount.setTextFormat(over_style);
}
function OUT_Handler(e:MouseEvent):void
{
var mc:MovieClip = e.currentTarget as MovieClip;
mc.rollCount.setTextFormat(out_style);
}