O'Reilly logo

HTML5 and JavaScript Projects by Jeanine Meyer

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

Building the application and making it your own

You can make this application your own by identifying your own image files, specifying what rectangles, ovals and hearts you want to include in the collection of objects to be manipulated and, after you have something working, adding new object types. The application has many functions but they each are small and many share attributes with others. An informal summary / outline of the application is

1. init for initialization, including setting up event handling for double click, mouse down, mouse move and mouse up

2. object definition methods: constructor functions, draw functions and overcheck functions

3. event handling functions: mouse events and button onClick

More formally, Table 2-1 lists ...

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