frameswitcher: added onhide

This commit is contained in:
2014-07-24 18:06:54 +04:00
parent bdced9a809
commit d1491d1bd7

View File

@@ -18,6 +18,8 @@ class FrameSwitcher extends GroupView implements IFrameSwitcher<Sprite> {
public function change(id:String):IView<Dynamic> {
if (current != null) {
if (current.id == id) return current;
var onHideethod:Dynamic = Reflect.field(current, "onHide");
if (onHideethod != null) Reflect.callMethod(current, onHideethod, []);
removeView(current);
}
current = frames.get(id);