Trying HTML5 as a Flash developer
// February 22nd, 2010 // Experiments
I chose that one because I knew it would be possible, its not to complicated and it has a little bit of everything: Loading external data, scripted animation, custom interactions and it needs a decent amount of computing power.
Its cool how can manipulate the DOM elements, I really loved that. And yes, It can and will replace some of the Flash out there. But there are sill a lot of limitations.
The canvas element is not an alternative for Flash. There is not something like a display-list and no mouse-events for separate elements. But I guess you can emulate that with a lot of layered canvases and other DOM elements, combined with mouse position calculations etc, but that’s going to be a mess and I don’t know if my cpu will like that… I’m also missing webcam access, decent sound handling, 3D (webGL will do that, but it won’t be in IE9), real video integration etc, the list goes on. You can say that they are details, but I used those things in almost every recent commercial project. At this point HTML5 would be a step backwards for me.
It’s doable if you make a 500 lines project, but if you need to do a 10,000-100,000 lines app/website (which I do daily in AS3) it’s not going to be funny any more.
Mobile Safari can’t handle it on an iphone. It goes really slow. But you can’t compare a normal cpu with a phone cpu. And I didn’t want to write about this, till I noticed something very strange and disturbing when I was testing it on the iphone.
Take a look at example below, and try to drag both images:
The left image just reacts as you would expect from an image in a browser. With the right image, I stopped the default browser behaviour, and made my own drag.
This is something very useful. Besides for dragging, you need this functionality if you want to make a html5 drawing app or, and this is the interesting part, if you want to detect mouse/touch gestures
But what seems to be the case : This doesn’t work on Mobile Safari!
They took our jobs!
As a Flash developer you can script advanced animations and interaction and UIs from scratch. You know your math. You can create large and complex client-side apps. You know how to be creative and create great user experiences with a limited tool-set. And you really love to do all those things.
So, if that day comes, there not gonna take our jobs, but were gonna take theirs.
WebGL is definitely still on my to-do list, but apart from that, I think I will stick with Flash for now. I have some pretty cool commercial projects coming up and Flash is still is the tool of my choice for experimenting.