开发者

How to close x number of popups one by one according to their visiblity?

Lets suppose, there are 4 popups in my application and a viewer presses Escape once. Now i want application to close the popup which is on the top. I dont know how to accompish this because i dont know thich popup开发者_Go百科 is to the front right now.

Regards Max


You can check the children in the systemmanager to know what child is on top. The last child will always be the top one. If you re-order windows, the collection will be updated. At least that is what a quick test tells me.

var sm:ISystemManager = Application.application.systemManager;
var topChildIndex:int = sm.numChildren - 1;
var topChild:Object = sm.getChildAt(topChildIndex);
// do something with topChild
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜