Skip to main content
Participant
July 20, 2021
Question

Accessing radiobutton font and size

  • July 20, 2021
  • 0 replies
  • 84 views

How can I change the font and the size of a radio button? My code is as follows:

 

import fl.controls.RadioButtonGroup;
import flash.events.MouseEvent;

var group:RadioButtonGroup = new RadioButtonGroup("My Question");

red.group = group;
green.group = group;
blue.group = group;
orange.group = group;

red.label = "Red";
green.label = "Green";
blue.label = "Blue";
orange.label = "Orange";

submit.label = "Submit";
submit.addEventListener(MouseEvent.CLICK, submitcolor);

function submitcolor (event:MouseEvent):void{
if (group.selection == null) {
return;
}
if (group.selection.label == "Blue") {
mytxt.text = group.selection.label + "is my fav color. nice job";
} else {
mytxt.text = group.selection.label + "is not my fav color. try again";
}
}

This topic has been closed for replies.