HTML5 optimization, Tiles animation optimization

Tested targets: flash, windows cpp, html5 (experimental)