Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex FillColor样式似乎不适用于按钮_Apache Flex_Actionscript 3 - Fatal编程技术网

Apache flex FillColor样式似乎不适用于按钮

Apache flex FillColor样式似乎不适用于按钮,apache-flex,actionscript-3,Apache Flex,Actionscript 3,我使用mx.controls.Button控件并尝试更改其颜色: import mx.controls.Button; //... var myButton:Button = new Button(); myButton.width = 70; myButton.height = 30; myButton.label = 'test'; myButton.setStyle('fillColors', [0x0f9f4f, 0x0f9f4f, 0x006600, 0x006633]); add

我使用mx.controls.Button控件并尝试更改其颜色:

import mx.controls.Button;

//...

var myButton:Button = new Button();
myButton.width = 70;
myButton.height = 30;
myButton.label = 'test';
myButton.setStyle('fillColors', [0x0f9f4f, 0x0f9f4f, 0x006600, 0x006633]);
addChild(myButton);
但它不起作用。然而,这种风格和其他许多风格都能很好地发挥作用。 如何更改按钮的颜色


怎么了?如何设置按钮的颜色?

FillColor采用两个参数,而不是四个参数

例如:
setStyle('fillColors',[0x000000,0xFFFFFF])

你也在试着设置fillAlpha吗


http://livedocs.adobe.com/flex/3/html/help.html?content=skinning_8.html

更改为2个参数。仍然不起作用。fillAlphas不起作用。请尝试先添加按钮,然后调用setStyle方法。