ActionScript is almost exactly the proposal that Mozilla and Adobe put forward as ECMAScript 4, which was boo'd and veto'd by Microsoft and Yahoo. Hence we now have ECMAScript 5, née "Harmony", née "3.1", which is minimum-viable-upgrade to the current ECMAScript 3 without all the useful things that ActionScript added.
While ActionScript is similar to ECMAScript, the standard libraries they work with are very different, and most of the trouble of writing a Flash -> Canvas cross-compiler would be in trying to write an ECMAScript layer that could do what the Flash runtime does in C, with the efficiency of C.
While ActionScript is similar to ECMAScript, the standard libraries they work with are very different, and most of the trouble of writing a Flash -> Canvas cross-compiler would be in trying to write an ECMAScript layer that could do what the Flash runtime does in C, with the efficiency of C.