彈出子窗口代碼:
protected function addBtn_clickHandler(event:MouseEvent):void
{
var addInfoWin:RInfoPanel = RInfoPanel(PopUpManager.createPopUp(this,RInfoPanel,true));
addInfoWin.mainApp = this;
//調用回調函數(shù)。用來刷新父窗口。
addInfoWin.callBackFunction = init;//init是父窗口的初始化程序。調用它用來刷新父窗口數(shù)據(jù)
addInfoWin.isPopUp = true;
PopUpManager.centerPopUp(addInfoWin);
}
子窗口回調函數(shù)訪問父窗口
[Bindable]
public var callBackFunction:Function;//回調函數(shù)
[Bindable]
public var mainApp:Object = null;
if(effectRows == 1)
{
Alert.show("添加成功!");
PopUpManager.removePopUp(this);
callBackFunction.call(mainApp); //回調函數(shù)。也可傳遞參數(shù)。
}
posted on 2011-04-15 11:24
長春語林科技 閱讀(1371)
評論(0) 編輯 收藏 所屬分類:
flex