The key point here is that without an air gap an inductor will saturate if you try to put any current through it so inductance will fall and you can't store any energy.
The term "Flyback Transformer" is a little misleading and its more useful to consider it as coupled inductors rather than a transformer because the action is quite different with a conventional transformer energy is going into the primary and out of the secondary at the same time it does not store energy. With a "Flyback" transformer energy is first stored then released.
Taking some things we know about inductors
$$v = L \frac{di}{dt} = N A \frac {dB}{dt}$$
Where v is voltage, i is current, N is turns, B is flux density and A is the effective magnetic area.
Also
$$H = \frac {N \ i}{l} \Rightarrow i = \frac {H \ l}{N} $$
where H is the magnetic field strength, N is turns and l is magnetic path length
Finally permiability
$$ \mu = \frac {B}{H} \Rightarrow H = \frac {B}{\mu} $$
Thus
$$i = \frac{B \ l}{\mu \ N}$$
Now we can calculate Energy
$$
$$\begin{align}
Energy & = \int{i \ v} \ dt\\
& = \int{\left( \frac{B \ l}{\mu \ N} \right) \ \left( N A \frac {dB}{dt} \right)} \ dt\\
& = \frac {A \ l}{\mu}\int{B} \ dB\\
& = \frac {A \ l}{\mu}\frac{B^2}{2}\\
\end{align}$$
$$
The energy storage is therefore only possible in the air gap and is proportional to be air gap volume and the square of the flux density.