O'Reilly logo

HTML5 Game Development HOTSHOT by Makzan

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

Adding a launch bar with power

The player doesn't know how much power needs to be applied to the ball. This will lead to confusion. We can improve this by displaying a power indicator when shooting the ball.

Prepare for lift off

We will create the hierarchy directly from Flash. The following screenshot shows the symbol hierarchy:

Prepare for lift off

Then, we export these graphics into a JS file that we can use directly in the CreateJS library. Or, you can find the file from the code bundle.

We create another new file, view.js. We will place the logic to control the assets there. Specifically, we control the power indicator graphics inside this file.

We will need to include ...

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