Generator can use middle ware as a data source in the same way that it can use a text file as a data source.
If you use this technique, then you have to set the correct content type so that your middle ware returns a text file, and not an html page.
Here is how to set the content type in various middle ware languages :
The only requirement is that you set the content type before you write anything (including blank spaces) to the browser or Generator.
Generator can use any data base with an ODBC or JDBC driver as a data source. This can be very useful.
However, some objects, such as the scrolling list object require that the data source contain certain columns (such as clip).
Of course one solution would be to change your tables column names to match those required by Generator. That however is not a good option, as it ties your data too closely too Generator.
If you want to refresh or update your data / graphics once they have been displayed in your browser then you need to reload the Generator content.
You can do this using Flash’s Action Script LoadMovie command.
If your template was named chart.swt, and you wanted to update the chart information, then you would do something like :
LoadMovie("chart.swt", "");
This will reload the Generator content into the same movie clip that the LoadMovie is called from.
You can download new Generator objects from the Macromedia Flash / Generator Exchange at :
http://www.macromedia.com/exchange/flash/
Just select Generator from the navigation select box.
In addition, most of the objects come with fully commented source code, so it is an excellent resource if you are developing your own custom objects with the Generator SDK.
Here is a list of the current objects on the exchange :
The object takes XML and makes it available to Macromedia Generator in a format that Generator can use (a result set like Column format). It utilizes the Generator SDK, the Apache Xerces XML parser, and the JDOM XML API.
Latest Updates
The example on the right is using Generator to dynamically pull in XML news feeds from moreover.com and insert them into a Flash movie.
The Insert SlashDot News Generator object allows you to use Slashdot’s XML news feed as a datasource for a Macromedia Generator template. It utilizes the Generator SDK, the Xerces XML parser, the JDOM API, and the Insert Date / Time Generator object.
The example on the right uses Macromedia Generator to dynamically create a Flash movie with the SlashDot.org news headlines. Do not link directly to the Flash file. Link to this page.
The Insert Date object and Insert Time object are custom Generator objects that make the server date and / or time available for use in a Macromedia Generator template.
You can specify that the time be formatted in 1 of 5 ways :
All of the formats except raw are determined by your server’s local settings. Raw format outputs the number of milliseconds since Midnight, GMT, January 1, 1970.