O'Reilly logo

Apollo for Adobe Flex Developers Pocket Guide by Jeff Swartz, Rob Dixon, Mike Chambers

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

Chapter 3. Using HTML Within Flex-Based Apollo Applications

Apollo gives developers a brand new way to integrate HTML rendering into desktop applications. Apollo’s new HTML functionality includes the ability to:

  • Load and render complete web pages (HTML and XHTML) from local and remote URLs as well as a string.

  • Access and manipulate the full Document Object Model (DOM).

  • Call JavaScript functions and reference JavaScript objects from within your ActionScript code, and vice versa.

  • Arrange the Flex HTML component in your application interface as you would any other Flex UI component.

  • Graphically alter the HTMLControl object or Flex HTML component as you would any Sprite or DisplayObject in ActionScript.

The new flash.html.HTMLControl class handles the core HTML loading, rendering, and script execution duties. Based on the HTMLControl class, the new Flex HTML component integrates the same HTML rendering power into the Flex UI framework.

An application with simple HTML rendering or web browsing needs can use the Flex HTML component with little or no ActionScript coding. Of course, more complex requirements will call for additional coding in either ActionScript or JavaScript.

This chapter describes Apollo’s HTML capabilities and offers a number of quick examples to get you started writing HTML-enabled Apollo applications.

You can also refer to the "Working with HTML" section of Chapter 5 for more ways to use HTML in Apollo.

HTML Support in Apollo

The Apollo HTMLControl class uses WebKit (www.webkit.org ...

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