Book Image

HTML5 for Flash Developers

By : Matthew Fisher
Book Image

HTML5 for Flash Developers

By: Matthew Fisher

Overview of this book

As the support for HTML5 within modern web browsers grows, the appeal of HTML5 development, especially for Flash developers, is at an all-time high. From 3D interactive multi-user content to high definition video streaming, HTML5 can deliver it all, to almost all modern web browsers, desktops, and mobile platforms. HTML5 for Flash Developers is a practical, targeted guide for developers with previous experience in developing applications in Flash who would like to add HTML5 development to their skill set. By understanding key aspects that make HTML5 development different from Flash you will be able to integrate your current skill set into the HTML5 development paradigm. Starting with identifying the key technologies that make up the HTML5 development stack and how they are utilized to create HTML5 content, HTML5 for Flash Developers will cover the traditional HTML5 application development flow chapter by chapter, while covering many other common tools that are regularly used in HTML5 today.In addition to understanding and writing dependency-free HTML5 code, you will also learn how to build your HTML5 applications on top of popular libraries and frameworks such as jQuery and CreateJS. This book covers how to prepare all of your content and media for integration into your HTML5 application using applications such as the Miro Video Converter or Adobe Photoshop. You will learn ways to not only continue to use Adobe Flash in your HTML5 application content preparation flow, but also how to port your existing Flash content right over to HTML5.Once you understand what it takes to build HTML5 content, you will finish up by learning how to debug, optimize, and prepare your content for release on the Web.
Table of Contents (17 chapters)
HTML5 for Flash Developers
Credits
About the Author
About the Reviewers
www.packtpub.com
Preface
Index

Dealing with audio and playback


Using the knowledge we have gained during the overview of HTML5 audio file type and codec support in this book, we can set up the audio for this game pretty easily. Rather than using the SWC importing method that was used in our Flash project, when importing audio into an HTML5 project, we can just append the reference to the source directly into the body of the HTML document inside of a <audio> element as follows:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Jet Pack</title>

    <link rel="stylesheet" type="text/css" href="css/Game.css">

    <script src="js/jquery.min.js"></script>
    <script src="js/Stats.js"></script>
    <script src="js/LevelBlock.js"></script>
    <script src="js/JetPackMan.js"></script>
    <script src="js/JetPackManData.js"></script>
    <script src="js/Game.js"></script>
  &lt...