private void writeObject(ObjectOutputStream out) throws IOException
	{
		out.writeObject(listeners);
		out.writeInt(imageIndex);
		out.writeObject(offset);
		out.writeDouble(x);
		out.writeDouble(y);
		out.writeInt(lastDepth);
		out.writeDouble(lastX);
		out.writeDouble(lastY);
		out.writeInt(depth);
		out.writeObject(mask);
		//out.writeObject(sprite);
		if(sprite!=null)
			out.writeObject(sprite.name());
		else
			out.writeObject("NULL");
	}