O'Reilly logo

Flash Development for Android Cookbook by Joseph Labrecque

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

Rendering a website within an application

With Flash content, it is traditionally not possible to display a fully rendered HTML website within an application. Adobe AIR initially changed this by allowing web pages to be loaded into the application on the desktop and interpreted through the internal AIR build of the web kit rendering engine through the desktop only HTMLLoader class. On Android, AIR allows us to do similar things through the use of StageWebView.

How to do it...

We will construct a new StageWebView instance to display a web page within our mobile Android application:

  1. First, import the following classes into your project:
    import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; ...

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