The flex sdk contains a program called mxmlc, which is what I use to compile actionscript into the flash swf files. I did a search for an introductory guide, and found one I remember from when I was starting out. It's for the Windows version of flex, but I think it's pretty obvious what needs to be modified if you are using a different OS. http://www.senocular.com/flash/tutorials/as3withmxmlc/
..Actually maybe start over at the begininng :-) I have no idea how flash works or how one makes it.