O'Reilly logo

HTML5 for Flash Developers by Matt Fisher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Canvas element

We can't finish this chapter without at least beginning to make mention of the HTML5 Canvas element. The Canvas allows developers to use the Canvas 2D Drawing API to draw graphics on the fly into an empty controllable area. From the perspective of a Flash developer, the easiest way to understand the Canvas elements feature set is that it uses similar features to the ActionScript 3 Drawing and Graphics API within an empty area in the HTML layout which is very similar to the Flash Stage.

To better understand what all the fuss is about, let's create a simple drawing application with the use of the Canvas. To begin, we need to append the Canvas element into the body of our HTML document. There is no content required to be inside ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required