flash cs4 如何新增自定义控件

1、 新增控件脚本*
import gfx.controls.CoreList;
import gfx.core.UIComponent;
import gfx.controls.CheckBox;


import gfx.utils.Delegate;
import flash.external.ExternalInterface;
[InspectableList("UIType")]
class SuperMoneyDedutionCheckBox extends gfx.controls.CheckBox
{


private var m_iUIType:Number = 0;
[Inspectable(name="UIType", defaultValue=0)]
public function get UIType():Number { return m_iUIType; }
public function set UIType(value:Number):Void {
m_iUIType = value;
}
public function SuperMoneyDedutionCheckBox() 

super(); 
trace("-------------------------------------------------------------------------------------------");
addEventListener("click",this,"OnCheckBoxClick");
}
public function OnCheckBoxClick()
{
trace("----------------------");
}

}

2、组件定义


3、元件属性


posted on 2015-06-29 11:38  KHacker  阅读(112)  评论(0编辑  收藏  举报