The fact is that HTML5 is not a reasonable general replacement for Flash. If you want your thing to work for most people, you are going to have to write in Flash anyway. Realistically, only a relative handful of people could run a HTML5/JavaScript program at Flash-equivalent speeds. And that assumes that you just want something in Flash that HTML5 could do; there's still RTMP and significant swaths of other stuff that Flash does and HTML5 doesn't.