This would depend on what language you may wish to port it to afterwards. For example, if you wanted eventually to port the game to C++, then you'd probably be better off starting off in C++ and cross compiling it with something like Crossbrigde (
http://adobe-flash.github.io/crossbridge/). Or if you wanted eventually to port the game to .NET for example, you might want to consider looking into Silverlight and XNA etc.
Actually porting the game from one language to another is an incredibly difficult and tedious task and trust me I've done it! There are always niggly bugs which haunt you and in essence what you end up doing is rewriting the entire game from scratch, porting the game one function at a time (at least in my experience and assuming the languages are radically different).
Having said all that though, I take it you are working with an existing codebase which has been programmed in flash/actionscript (with the flash API) and are wanting to use the codebase in a language you are more familiar with, let's say C++ for example.
Porting over the APIs can be difficult since there is no guarantee of there being an equivalent API function in your target language, my approach has always been to simply build these APIs as functions in the main program and have the function call an equivalent API/s and reformat the output so as you don't need to mess too much with the structure of the function that called it. That saves a lot of time but can also be hard work and would be considered rather inelegant by some people's standards.
I'm sure someone more experienced may have a better solution, but ultimately it will depend on what your level of programming knowledge is (in both the source and target language), how much time you have to port the code, the differences between the languages etc. This is all of course, assuming you are targeting the same platform, if you're porting cross platform or wanting to write cross-platform code then you need to take into account these differences, especially if you are porting a high level relatively platform neutral language like flash into something low level such as C.
As Rickton says, Haxe is a good choice (cross platform), has a syntax which should feel familiar to flash coders and with the OpenFL library you may find it much easier to port those actionscript APIs without too much of a headache.