flash cs4 如何新增自定义控件
生活随笔
收集整理的這篇文章主要介紹了
flash cs4 如何新增自定义控件
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
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("----------------------");
}
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、元件屬性
總結(jié)
以上是生活随笔為你收集整理的flash cs4 如何新增自定义控件的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 蒙特卡洛模拟 matlab实例,蒙特卡洛
- 下一篇: 我看小米