public static void deleteListeners() {
		EventManager evt = getEventManager();
		if (evt == null) {
			return;
		}
		evt.removeListener(self);
		if (Script.paint != null) {
			evt.removeListener(Script.paint);
		}
		if (Script.motion != null) {
			evt.removeListener(Script.motion);
		}
		if (Script.mouse != null) {
			evt.removeListener(Script.mouse);
		}
		if (Script.paintMotion != null) {
			evt.removeListener(Script.paintMotion);
		}
		if (Script.paintMouse != null) {
			evt.removeListener(Script.paintMouse);
		}
		Script.mouse = null;
		Script.paint = null;
		Script.motion = null;
		removeListeners(listeners.toArray(new EventListener[listeners.size()]));
	}