一、状态按钮
ToggleButtonBar
清除按键的选中状态:public function clearSelected():void{
if(selectedIndex != -1){
var btn:Button = getChildAt(selectedIndex) as Button;
btn.selected = false;
this.dataReset = false;
}
}
二、色板
ColorPicker
得到选中色板的颜色值:在change事件中调用:private function setColor(evt:ColorPickerEvent):void{
cnv.setStyle("backgroundColor",evt.color);
}
三、用SWFLoader载入swf文件
source="assets/Sub1.swf"/>
四、设置控件在页面中的索引
(将索引(tabIndex)设置为1)
五、利用控件的labelFunction来设置控件的显示内容
private function getFullName(item:Object):String{
return item.fName + " " + item.lName;//(item为每一项的数据源值)
}
六、菜单
MenuBar
Source">
Source1" type="separator"/>
Source2" type="separator"/>
Source3" type="separator"/>
public function memuClick(event:MenuEvent){
Alert.show(event.item.@label + "被选中!");
}
七:日期控件
(日期文本框)
(日期选择器)
八:弹出窗口
PopUpManager
//弹出
public function testPop(){
p2 = new part2_titlewindow();
p2.message = "dddddd";
PopUpManager.addPopUp(p2,this,true);
PopUpManager.centerPopUp(p2);
}
//关闭
public function outPot(){
PopUpManager.removePopUp(p2);
}
九:自定义的弹出按钮边框
1》自定义类:CustomPanelSkin
复写方法:override protected function updateDisplayList(w:Number,h:Number):void {
super.updateDisplayList(w,h);
var gfx:Graphics = this.graphics;
gfx.beginFill(this.getStyle("borderColor"),this.ge tStyle("borderAlpha"));
gfx.moveTo(this.getStyle("cornerRadius"),0);
gfx.lineTo(15,-10);
gfx.lineTo(25,0);
}
2》设置边框皮肤
十:focusIn与focusOut等事件
与click等事件一样,添加监听器,定义事件发生的所有执行的方法即可。
十一:
ToggleButtonBar
清除按键的选中状态:public function clearSelected():void{
if(selectedIndex != -1){
var btn:Button = getChildAt(selectedIndex) as Button;
btn.selected = false;
this.dataReset = false;
}
}
二、色板
ColorPicker
得到选中色板的颜色值:在change事件中调用:private function setColor(evt:ColorPickerEvent):void{
cnv.setStyle("backgroundColor",evt.color);
}
三、用SWFLoader载入swf文件
source="assets/Sub1.swf"/>
四、设置控件在页面中的索引
(将索引(tabIndex)设置为1)
五、利用控件的labelFunction来设置控件的显示内容
private function getFullName(item:Object):String{
return item.fName + " " + item.lName;//(item为每一项的数据源值)
}
六、菜单
MenuBar
Source">
Source1" type="separator"/>
Source2" type="separator"/>
Source3" type="separator"/>
public function memuClick(event:MenuEvent){
Alert.show(event.item.@label + "被选中!");
}
七:日期控件
(日期文本框)
(日期选择器)
八:弹出窗口
PopUpManager
//弹出
public function testPop(){
p2 = new part2_titlewindow();
p2.message = "dddddd";
PopUpManager.addPopUp(p2,this,true);
PopUpManager.centerPopUp(p2);
}
//关闭
public function outPot(){
PopUpManager.removePopUp(p2);
}
九:自定义的弹出按钮边框
1》自定义类:CustomPanelSkin
复写方法:override protected function updateDisplayList(w:Number,h:Number):void {
super.updateDisplayList(w,h);
var gfx:Graphics = this.graphics;
gfx.beginFill(this.getStyle("borderColor"),this.ge tStyle("borderAlpha"));
gfx.moveTo(this.getStyle("cornerRadius"),0);
gfx.lineTo(15,-10);
gfx.lineTo(25,0);
}
2》设置边框皮肤
十:focusIn与focusOut等事件
与click等事件一样,添加监听器,定义事件发生的所有执行的方法即可。
十一:
本文深入探讨了状态按钮、色板、SWF加载、索引设置、菜单、日期控件、弹出窗口、自定义按钮边框、焦点事件、标签等功能在网页开发中的应用,同时介绍了日期选择器、自定义弹出按钮边框、日期文本框、前端与后端开发、移动开发等技术领域的关键组件。此外,文章还涉及了自定义边框、弹出窗口管理、不同类型的日期选择器、标签管理及焦点事件处理等核心概念。
1936

被折叠的 条评论
为什么被折叠?



