i want to do offline isolated flyback, but i want to make the flyback transformer with as little leakage as possible.
Does this mean that i should use a transformer with a long core, so that i can wind the primary as two single windings , covering exactly the length of the bobbin core.
......and in order to further reduce leakage, i should have the secondary winding in between the two primary halves?
I don't think, that a long core offers particular advantage. (I don't see it intuitivly, but I didn't try). Interlaced split windings are a common method to reduce leak inductance. If you can get a copy of Snelling Soft Ferrites, it has a chapter about windings, also discussing leak inductance minimization.
For a flyback transformer, the position of the air gap can be expected to have on influence on leak inductance.