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>></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:
- asfunction (TextEvent.LINK) Tutorial for AS3 | Flash HTML Link to call actionscript function, by Evan Mullins. I haven't looked closely at this tutorial; but it seems to cover the topic of firing functions from HTML links from within an AS3 app.
- Add mousewheel functionality on Mac OS.
- ActionScript 3 XML Basics - This tutorial shows how to use the new XML features in AS3 by creating a simple RSS reader
- FlashReplace: HTML Flash implementation.
- XML Pages with ActionScript 3: Create multiple Flash pages using XML. In the Flash movie, all the content and image paths have been defined in a XML file. I will first give you a short intro to XML, then we set up the Flash movie and finally, we add some ActionScript 3 to provide the functionality.
Loading XML Data Using ActionScript 3.0, on Republic of Code.
- CSS styling a Flash dynamic website Actionscript 3.0 html Text tutorial CS3+4, on DevelopPHP.
0 comments:
Post a Comment