Book Image

HTML5 Game Development by Example: Beginner's Guide

By : Seng Hin Mak
Book Image

HTML5 Game Development by Example: Beginner's Guide

By: Seng Hin Mak

Overview of this book

Table of Contents (18 chapters)
HTML5 Game Development by Example Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
9
Building a Physics Car Game with Box2D and Canvas
Index

Adding a sound effect to the Play button


We had several mouse interactions in the Untangle game examples in previous chapters. Now imagine that we want to have sound effects with the mouse interaction. This requires us to instruct the game about the audio file to be used. We will use the audio tag to create a sound effect when a button is clicked.