Look at this sh*t : Flash Gordon

It's implemented in pure Javascript and HTML5, and the whole thing is open source, MIT-licensed.