Friday, December 10, 2010

Master HTML Formatted Text in Flash

Master HTML Formatted Text in Flash:

We’re going to look at how to display HTML-formatted text loaded from XML, styled from an external CSS stylesheet with fonts loaded at runtime. We’ll also master inline image placement via the HTML <img> embed tag, and adding custom events to HTML text links.


Step 1: Why Use HTML-Formatted Text and External Assets?

It is certainly easy to keep all assets directly in the Flash source file itself, and sometimes that may be the best solution. However, there are some good reasons to keep as much content separate from your Flash document as possible, or even to keep your Flash source solely composed solely of ActionScript.

  1. Your SWF will load faster. Keeping the content separate from the Flash file allows you to load only the assets you need at runtime, thus delivering your content faster.
  2. Updates are easier. Instead of requiring a Flash developer to crack open the .fla and republish, all that is necessary is a simple edit to the html or css.
  3. Multiple applications. The external content is available to use for other applications, such as for creating an HTML5 version of the site for the iPad.
  4. OOP. Best of all, keeping the content separate from the delivery application is good object-oriented programming. Methods like this are the building blocks for developing systems, templates and components for re-use and rapid development.
[...] Readmore: Master HTML Formatted Text in Flash

No comments:

Post a Comment