Wav to swf converter

I use Action script2 eventhough I use cs3.

I want to build a product which converts wav files to swf.
I want to build it on my own.
Can it be done using Flash.
Or should we use flex or some other builder.

I know there are products in market,but I want to know how this can be done on my own.
Because I have my own requirements.