Reputation: 201
How can I resize the radio button component that comes with Flash CS5.5?
The default look is quite small. The same applies to the radio button label which is also quite small.
Thanks in advance
Upvotes: 0
Views: 1605
Reputation: 14406
You can find the graphical assets in the library. The folder will be "Component Assets" -> "RadioButtonSkins"
. Take note that there are many movie clips that comprise the various states of the radio button
As for the text/label portion of the radio button, you have to do that through code. Here is an example function you could have:
function styleRadioButton(rb:RadioButton, myTextFormat:TextFormat):void {
rb.setStyle("embedFonts", true); //if you want to use an embedded font
rb.setStyle("textFormat", myTextFormat); //set the text format
rb.setStyle("antiAliasType", AntiAliasType.ADVANCED); //if you want smoother looking fonts
rb.textField.autoSize = TextFieldAutoSize.LEFT; //if you want the label to automatically grow
}
So if you have an instance of a checkbox called myRadio
, you could do this:
var textFormat:TextFormat = new TextFormat("Arial", 24, 0xFF0000); //make a red, 24px Arial text format
styleCheckBox(myRadio,textFormat);
Now, one easier thing you could also do is just place your radio button inside of a MovieClip
or Sprite
container and scale said container. To do this:
1 - place an instance of a radio button on the stage
2 - with the newly made instance selected, press F8 (or Modify -> Convert To Symbol)
3 - Scale the newly made movie clip
Upvotes: 1