Monday, August 17, 2009

The single text box Flash Web site

The basic idea here is to create a single page that swaps in content from an XML file. The text content populates into a single text box that resizes according to the amount of text, with a scroll bar popping in for extra-long text. Content sub-elements are linked from within the content text. When you close a sub-element, the text box goes back to the point from which you clicked on the sub-element.

This is sort of a super-template. Change the images and the XML content, and you have an entirely different site. I was going to build a content creator to write the XML, but I have become discouraged by the abysmal implementation of HTML/CSS that has persisted in Flash since at least version 6. When the Text Layout Framework is implemented, this may all become a moot point anyway.

Speaking of Flash HTML quirkiness, here's kind of an annoying little glitch:

Note that the bullets turn the same color as the link color. Here's the code: <li>Dysfunctional Managers....<a href="event:2">read more&gt;&gt;</a></li> There is no CSS on the UL. The CSS for the link provides the blue. Who knows why Flash gratuitously colors the bullets blue?

Here is the link. All content is external. The app reads in a variable from the XML to hide or show the info button in the upper right. This button always links to a PDF document named information.pdf. Another implementation is here.

The XML is here. An external CSS style sheet is here. There is also internal CSS for the menu. The commented source code in the FLA is here. You can also just snatch the SWF, then change the XML, and if you want, change the CSS. Put all of your images into an images directory under the directory where you put the HTML, CSS, XML, and the SWF. Then you can use the app as your own. As usual, you don't have to credit The Curmudgeon, who is too old to care, anyhow.


See also:

0 comments: