radio button text font



import fl.controls.RadioButtonGroup;
import fl.controls.Label;

var myFont:Font = new Stylo();
var myTextFormat:TextFormat = new TextFormat();
myTextFormat.font = myFont.fontName;
myTextFormat.size = 16;
myTextFormat.color = 0xFFCC00;;
btnYes.setStyle("embedFonts", true);
btnYes.setStyle("textFormat", myTextFormat);
btnNo.setStyle("embedFonts", true);
btnNo.setStyle("textFormat", myTextFormat);

//answer.visible=false;

btnYes.addEventListener(MouseEvent.CLICK, select_option);
btnNo.addEventListener(MouseEvent.CLICK, select_option);
var option:String;
function select_option(e:MouseEvent):void
{

switch (e.currentTarget)
{

case btnYes:
option = "Yes";
break;

case btnNo:
option = "No";
break;

}
//answer.visible=true;
//trace(option);
answer.myanswer.text = option;
MovieClip(root).play();
}


0 comments:

Post a Comment