Book Image

iAd Production Beginner's Guide

By : Ben Collier
Book Image

iAd Production Beginner's Guide

By: Ben Collier

Overview of this book

Think of an iAd as a micro-app contained within an app on a user's iPhone or iPad that they've downloaded from the App Store. When the user taps your advert's banner it bursts into life filling the entire screen of their device. iAd Beginner's Guide takes you through the start to finish process of building rich, compelling, interactive iAds. You will learn to create beautiful multi-page ads with store finders, social sharing, 3D images and video galleries. You will create ads that utilize the powerful technologies in the iPhone to make your brand shine. Once you have engaged the user you can carry out targeted advertising campaigns with location-based coupons, store finders and social engagement. Using the iTunes Store you will see how it's even possible to add one-click digital content purchasing right within your ad. Learn how iAd producer manages all the HTML5, JavaScript, and CSS3 behind your iAd. You will be creating emotive, gripping and effective mobile advertising campaigns in no time.
Table of Contents (18 chapters)
iAd Production
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Time for action — controlling an audio player


Let's combine an audio object from the object library with some JavaScript code to make our audio clip play every time the user shakes the device:

  1. 1. We'll use our example project Dino Stores that we built at the beginning of the book and make the dinosaurs roar each time they shake our Shake to Change gallery. Open the project in iAd Producer now. If you haven't completed the project, you can use the 6.Dino Stores - Store Finder in the Dino Stores exercises folder.

  2. 2. Open the Shake to Change page on the canvas. From the object library, add an audio object to the canvas and position it off screen so the user won't be able to see it.

  3. 3. With the object selected, expand the inspector pane and select roar-noise.m4a as the audio clip's file, as shown in the following screenshot:

  4. 4. Select the shake view object by clicking on the dinosaur image. Right-click on it and select Object Events | Did Shake | Execute JavaScript. This will open the code editor...