Introduction

The project for this chapter is a jigsaw puzzle that becomes a video when complete. It has been tested on Chrome, Firefox, Opera, and Safari on computers equipped with a mouse, and on the iPhone and iPad using finger touch. The jigsaw pieces are positioned randomly on the screen each time the program is loaded, or the button is clicked to restart the program. Figure 8-1 shows an opening screen when the program is run on a desktop computer running the Firefox browser.

Image

Figure 8-1. Opening screen on computer

On a computer, the player uses the mouse to move and reposition pieces. Randomly positioned pieces may end up on top of each ...

Get HTML5 and JavaScript Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.