The distinction between video container and codec is important to understand:
The container format specifies the types of data within and the way it is stored, but not specifics on how to view the individual streams. See also Comparison of container formats. That is where video codecs come in, which are often confused for containers themselves.
A video codec is a way of compressing and decompressing digital video so that the overall file size is smaller than the original uncompressed video. Most video codecs use lossy compression; meaning that after uncompression, the video has lost some of its original quality. Although there are lossless video codecs such as HuffYUV and Lagaraith, they are much less common as some quality loss is generally accepted for having more manageable files.
Each codec has its own particularity: Some result in better compression, some in better quality, others are better at encoding transitions (when the video films rapid movements).
Flash Video is a container file format used to deliver video over the Internet. Though the Flash Video container format itself is open, the codecs used with it are patented. The most recent public releases of Flash Player also support H.264 video and HE-AAC audio.
Therefore, FLV files by themselves do not assure better video quality. An FLV file containing H.264 video will have, when comparing with AVI, the same quality and a comparable file size. However, you'll find that more players know how to play AVI format than FLV.