Measuring direction or magnitude of magnetic fields or magnetic flux using the flux-gate principle in thin-film element