It is definitely possible, but I doubt such an approach is trivial. And you will not be able to make use of hardware acceleration. A big complaint about lack of performance in The Flash Player is lack of hardware acceleration when playing video.
If it is important to play AVI / MOV files, I would strongly suggest you look into players that already do this (Quicktime and/or Windows Media PLayer) which are already set up to handle issues like the numerous codecs an AVI file can be encoded in and use of hardware acceleration as appropriate.
If you re still desire to make this all in the Flash Platform, converting the files to FLV is going to be a lot easier on you in terms of development time than writing your on codecs. Camtasia is one software that you can use to convert, but you have to do so in real time, recording the screen. I have found it to be like a swiss army knife of video conversion.
Free conversion tools I have tried balloon file size up astronomically.