Flash Button component custom TextFormat
Posted in Flash by Flash CS3 and Flash CS4 tutorials on the 10-06-2009Customizing the design of a Button component is pretty easy since just double click it in the library and enter into its graphics so that you can change them as you prefer.
The major challenge is to be able to change the font, color and size of the text Button.
This can be done using the setStyle method of the Button class associated with a TextFormat.
To change the style of the text must specify a new TextFormat object (flash.text.TextFormat) and associate it with the Button component.
This allows you to change the text alignment, color, size, font (bold), font (italics), as well as other properties.
We can also assign the html text to label of our button.
This approach is applicable to CS3 and CS4 versions of Flash.
Note: Not all properties of the TextFormat class are supported by the Button.
For example, the url property of the TextFormat class has no effect if applied to the Button class.
Let’s see the example.
Tags: button, Components, customize components, textformatRelated posts
- Winners of CurveMenu Flash component (0)
- Win FlashEff component (175)
- Win a FlippingBook PDF publisher component (0)
- Win a Flash component CurveMenu (0)
- Win a 3D stack component by Flashloaded (0)

Responses to “Flash Button component custom TextFormat”