Flak defends its' tile only. It does not work when in a transport as far as I know, unless the transport is in a city, then it might.
If I might offer some advice on usage, it is generally cheaper and more effective to use fighters for air superiority if you can build them. They take a turn or two to get in position, but are much more effective (they defend half their range value, so a range 4 air unit defends a 2 tile radius). Flak can be useful for defending an area that fighters cannot defend in time, but it can cost more unit support for the same effect.