 				
 			try
 			{
-			    // Remove both listeners in case the system manager was added
-			    // or removed from the stage after the listener was added.
 				if (stage)
 					stage.removeEventListener(type, listener, useCapture);
-
-					super.removeEventListener(type, listener, useCapture);
 			}
 			catch (error:SecurityError)
 			{
-				super.removeEventListener(type, listener, useCapture);
 			}
+			// Remove both listeners in case the system manager was added
+			// or removed from the stage after the listener was added.
+			super.removeEventListener(type, listener, useCapture);
 		
 			return;
 		}

		    dispatchEvent(dynamicEvent);
        }
    }
}

}




import mx.events.DynamicEvent;
import mx.events.FlexEvent;
import mx.events.ResizeEvent;
import mx.events.SandboxMouseEvent;
import mx.preloaders.Preloader;
import mx.utils.LoaderUtil;

