Separating Content and Presentation

Its much more flexible for you to build Flash movies that include dynamic content. The term dynamic content means that the content changes independently of Flash and that the data is stored in a separate place. When you separate data from its presentation, you dont have to use Flash to update the content. Even if you dont know how to use Flash, you can still change the contents of a movie by changing the external data source.

This means your clients can update their own Flash content. For example, if you are drawing content from an XML or text file, they can open a text editor and edit the contents directly. They can also change the content in a database like MySQL or Access or by using web forms. Your clients are no longer reliant on you every time they want to make a change. All you need to do is provide them with a mechanism for updating the data source.

In the case of XML, clients could update content directly using an XML editor. This would be appropriate for data with a simple structure and confident clients. You can also provide a web form that allows clients to make updates.

You can even set up Office 2003 documents that generate XML content. Clients can make changes in Word, Excel, or Access and export the contents to an XML document. If the Flash movie is part of a website, they can then use a web form to upload the new XML file.

Going back to my Dura-lite example, the client maintains the content of their Flash catalog with Excel. They export the Excel file as an XML document. Figure 1-11 shows how to do this. I cant show the Duralite Excel file for commercial reasons, but the screenshot gives you an idea of the process they use.

image from book
Figure 1-11: Exporting XML data from an Excel spreadsheet

Figure 1-12 shows the web interface that Dura-lite uses to upload a new XML file. This is in a password-protected area so Im unable to provide a link to the page, but the screenshot should give you the general idea.

image from book
Figure 1-12: Dura-lite uses a web interface to upload their new XML files.

Another benefit of separating Flash movies from their content is that you can use the same data structure with completely different movies or view different data using the same movie. For example, in Figure 1-13, the Flash newsreader that I showed you earlier displays a different news feedin this case Australian news.

image from book
Figure 1-13: The same Flash movie can be used to access multiple sources of information.

If you keep the data structures constant, you can vary the visual appearance by changing Library elements within Flash. Youll be able to use exactly the same ActionScript to load and display the XML content within Flash. That way, you can sell the same solution with different skins.

Figure 1-14 shows the original newsreader with slightly different styling. I make no comment about how attractive the design is!

image from book
Figure 1-14: The same source of information can be used with different Flash movies.

Foundation XML for Flash
Foundation XML for Flash
ISBN: 1590595432
EAN: 2147483647
Year: 2003
Pages: 93
Authors: Sas Jacobs © 2008-2017.
If you may any questions please contact us: