1.Custom Button
2.Custom Button Skin
public class GrayButton extends spark.components.Button
…
[HostComponent("GrayButton")]
public class GrayButtonSkin extends
spark.components.supportClasses.Skin implements mx.core.IStateClient2{
…
return hostComponent.selectedColor;
…
}
Flex sdks 4.1.0.16076 compiler error:
[HostComponent] class GrayButton not found
Solution:
1.Custom Button
No change.
2.Custom Button Skin
[HostComponent("spark.components.Button")]
public class GrayButtonSkin extends
spark.components.supportClasses.Skin implements mx.core.IStateClient2{
…
return GrayButton( hostComponent).selectedColor;
…
}