Dual Design: Maintaining Consistent Flash and Html Pages
Ken Goldberg and Guy Boo
UC Berkeley, September 2005, Released Summer 2006

Goal: combine the design of Flash with the practicality of HTML.


  1. Maintainability. HTML is very easy to edit and update: the solution should be just as easy.
  2. Searchability. I want my information to be found and indexed by search engines.
  3. Compatibility. Not everyone has Flash. My solution must work with as many browsers and printer configurations as possible.

Our Solution: Dual Design


You maintain all your links and labels in one simple XML file. Whenever you update this file, you just run a Perl script (see below) that interprets it and creates new versions of the HTML and Flash pages for you. The updated index.html is available for web crawlers, browsers that don't have Flash, and printing.

Dual Design is open-source: you can download everything you need to build your own dual design page with your own colors and links.

For browsers that support Flash, the flash version of the site downloads, parses, and plays the content.xml file on the fly when it is downloaded. We use Flash's native XML class to download and parse the source file, MovieClip class to load any needed images and manage and animate elements onscreen, and TextField class to display and animate text and display small snippets of HTML.

Do it yourself:

Further Research

Background on the Flash document used to code and publish the flash parser - might be readable only by Flash MX Professional 2004
The Macromedia Flash help files
Useful to gain a basic familiarity of Flash.
The Macromedia ActionScript API (accessible from the previous link)
Indispensable resource when tackling ActionScript.
An extremely useful resource for learning about Flash, ActionScript, and XML with an emphasis on coding.
Schwartz, Randal L. and Christiansen, Tom. Learning Perl. 2nd ed. O'Reilly & Associates, Inc. 1997.
A decent, easy to read primer that covers almost everything you need to know to write the parser. Get the latest edition you can find, the earlier ones have less content.
The Perl man pages: perlref, perlintro, perlsub, perltoc...
The complete and unabridged guides to the Perl language. After reading Learning Perl, perlref is particularly useful as it covers a great deal of new territory. (Enter 'man man' on the command line to learn how to read man pages, or to see if your system even supports them or has any.)
Contact: Guy Boo or guyboo at berkeley dot edu or Ken Goldberg goldberg at berkeley dot edu.
Please let us know if this is useful or if you have improvements to post! We put this online as a resoure and regret that we can't provide detailed support, help you debug, etc...