Flex各种类 弹出窗口,设置焦点,日期,自定义事件
格式化
import mx.formatters.DateFormatter;var fr:DateFormatter=new DateFormatter();fr.formatString="YYYY-MM-DD";fr.format(new Date());
var consumer:H_HDMain=new H_HDMain;consumer=H_HDMain(PopUpManager.createPopUp(this,H_HDMain,true,null));consumer.par="传值";PopUpManager.centerPopUp(consumer);
import mx.managers.FocusManager;var fo:FocusManager=new FocusManager(this);fo.setFocus(hdName);
<mx:DateField id="endtime" x="563" y="72" dayNames="[日,一,二,三,四,五,六]" formatString="YYYY-MM-DD"monthNames="[一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月]" fontSize="12" width="128" height="26" text="{dataStart}"/>
package hd.myevent{import flash.events.Event;public class DeleteEvent extends Event{static public const DELETEEVENT:String = "deleteevent"; public function DeleteEvent(data:Object, bubbles:Boolean=true, cancelable:Boolean=false) { super(DELETEEVENT, bubbles, cancelable); this.data=data; } public var data:Object;}}