xmlns:s=”library://ns.adobe.com/flex/spark”
xmlns:mx=”library://ns.adobe.com/flex/mx”
width=”100%” height=”100%”>
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.managers.PopUpManager;
[Bindable]
//表格数据源绑定
private var grid:ArrayCollection=new ArrayCollection([
{number:”2014010101″,name:”张散”,sex:”男”,age:”23″},
{number:”2014010102″,name:”李思”,sex:”女”,age:”22″},
{number:”2014010101″,name:”吴王”,sex:”男”,age:”21″},
{number:”2014010101″,name:”赵柳”,sex:”女”,age:”20″},
{number:”2014010101″,name:”游华”,sex:”男”,age:”22″},
{number:”2014010101″,name:”祝思”,sex:”女”,age:”18″},
{number:”2014010101″,name:”周礼”,sex:”男”,age:”19″},
{number:”2014010101″,name:”华捷”,sex:”女”,age:”20″},
{number:”2014010101″,name:”刘亮”,sex:”男”,age:”22″},
{number:”2014010101″,name:”沈雪”,sex:”女”,age:”21″}
]);
protected function updateHandler(event:MouseEvent):void
{
//新建子窗体对象
var childWindow:ChildWindow=new ChildWindow();
//将子窗体添加到PopUpManager中
PopUpManager.addPopUp(childWindow,this,true);
//向子窗体传递参数
childWindow.age=”23″;
//子窗口调用父窗口函数
childWindow.callBack=this.myFunction;
//子窗体居中弹出
PopUpManager.centerPopUp(childWindow);
}
public function myFunction(you:String):void
{
Alert.show(you+”Hello”);
}
]]>
verticalAlign=”middle” textAlign=”center”>