The answer is no. you cant transform a avi,mpeg or mp3 to a swf format. what you usually see on online is flash applications that plays a video or audio file. This means the swf containts a avi,mpeg or mp3.
To do this you will need flash and build yourself a media player.
This is my junk I'm gona eat it