I have a textbox and a button on the stage and what i want is, when the user clicks on the button the font in the textbox to be changed.
This is the code I have, but nothing is happening when I click the button.
SinFont is the embedded font.
Please help!!
btnChange.addEventListener(MouseEvent.CLICK, changefont);
function changefont(event:MouseEvent):void
{
var getFont = new SinFont();
var txtForm:TextFormat = new TextFormat();
txtForm.font = getFont.fontName;
txt1.embedFonts = true;
txt1.antiAliasType = AntiAliasType.ADVANCED;
}