Publishers often promote their back catalogue within their latest releases, providing direct links to each of their products within the App Store. This not only makes the purchase process incredibly easy for the user, but also encourages impulse buying.
The App Store can be launched directly from your AIR for iOS app by passing a specific iTunes URL to Flash's
navigateToURL()
function. Let us see how to do this.
An FLA has been provided as a starting point for this recipe.
From the book's accompanying code bundle, open chapter13\recipe7\recipe.fla
into Flash Professional. Sitting on its stage is a button named storeBtn
.
Let us write some ActionScript to launch the App Store when this button is pressed.