This is a tooling problem imo, and whatever tool that is should just output javascript that works on a canvas. There's no reason to cram another programming language like ActionScript into browsers by default.
Anything that installs and runs like Flash/AS is going to raise security concerns though. Please let's not repeat all that bullshit.