There used to be an Open-Source project called Ming, which was exactly that... a library that would generate Flash based on C/C++. I'm not sure if it ever got anywhere, though.
As you can imagine, the most efficient ActionScript code is going to be generated by you, writing ActionScript.