Janyou's blog

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

1.Custom Button


public class GrayButton extends spark.components.Button


2.Custom Button Skin

[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;

}

posted on 2011-03-26 15:23  janyou  阅读(605)  评论(0编辑  收藏  举报