// Import the required component classes.
import fl.controls.Button;

// Create a new TextFormat object which will be used for the button's label.
var myTextFormat:TextFormat = new TextFormat();
myTextFormat.bold = true;
myTextFormat.color = 0xFF0000;

/* Create a new Button component instance and set the textFormat style to the
   TextFormat object created earlier. */
var myButton:Button = new Button();
myButton.label = "Click me";
myButton.move(10, 10);
myButton.setStyle("textFormat", myTextFormat);
addChild(myButton);

全文:http://www.adobe.com/cn/devnet/flash/quickstart/button_component_as3.html#articlecontentAdobe_numberedheader_4

相关文章:

  • 2021-07-13
  • 2022-12-23
  • 2022-01-08
  • 2021-11-17
  • 2021-06-29
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-25
  • 2021-12-26
  • 2022-12-23
  • 2021-07-02
  • 2021-12-10
相关资源
相似解决方案