// 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);
因篇幅问题不能全部显示,请点此查看更多更全内容