             if (getStyle("minimizeEffect"))
             {
                 event.preventDefault();
-                addEventListener("effectEnd", windowMinimizeHandler);
+                addEventListener(EffectEvent.EFFECT_END, windowMinimizeHandler);
                 dispatchEvent(new Event("windowMinimize"));
             }
         }

                    e = new FlexEvent(FlexEvent.HIDE);
                    if (getStyle("hideEffect"))
                    {
                        addEventListener("effectEnd", hideEffectEndHandler);
                    }
                    else
                    {

import mx.core.IWindow;
import mx.core.mx_internal;
import mx.events.AIREvent;
import mx.events.EffectEvent;
import mx.events.FlexEvent;
import mx.events.FlexNativeWindowBoundsEvent;
import mx.managers.DragManager;
