The Insert Flash Variables object allows users to use Generator to dynamically insert flash 4 arrays into a Flash movie.
Users can then use this object in place of middle ware to dynamically pull data into their movies on the client side.
This has the benefits of not requiring the user to have to know a middle ware language, providing the ability to completely work within the Flash / Generator authoring environment, and the ease of loading and working with Flash data structures (Flash 4 arrays). Plus if you data does not change often, then you can use this object instead of having to do a load variables every time.
Generator will not allow you to dynamically specify font attributes such as Font Size, spacing, and Face. However, it is possible to to do this with a couple of workarounds.
The first is to use nested movie clips, and the insert symbol command to determine you font attributes.
This is discussed in detail in the following technote :
Dynamically assigning type faces to Generator variables
http://www.macromedia.com/support/generator/ts/documents/dynamically_assigning_type_.htm
However, if you want to allow the users a lot of options, then this method quickly becomes tedious.
The Insert Symbol Generator object allows you to dynamically load symbols from your library and place them into you movie.
It is good practice to to create folders within your library in order to better organize your symbols, however this can make it difficult to reference the symbols from Generator.
For example, if you have the following library structure:
Symbol Library
and you try to load mySymbol1 from the Insert Symbol object, then the symbol not contained in a folder will be loaded.
The Insert Date / Time custom object (actually two separate objects) makes the server’s date or time available for use in a Generator template. This is useful for letting users know when content was last updated, or version control during development.
You can also use the object in conjunction with Flash 5 Action Script’s date object. See the demo below for more information.
You can view a working demo here (archived).
The Insert Jpg, Insert Gif, Insert Png, and Insert image objects all give you the ability to scale the image to fit the object’s bounding box. However, this can lead to images which are out of proportion to the original image as Generator will stretch the image to completely fill the bounding box.
If you need to be able to scale images while maintaining their proportion, then you have to use the Insert Image object (or gif, jpg, png) in conjunction with the table object.
Generator has a separate image object for each of the image types it supports :
If you are not sure the type of image that will be inserted into the Generator template then you have to do one of two things :
Make sure that they are the same size and have the same property, and then for the image name, place the same Generator variable in object. Then when Generator processes the template, it will attempt to insert the image into each object, but only the correct object will work. Other than throwing some errors this will work fine.
From time to time the tip of the day will highlight one of the new custom Generator objects released on the Macromedia Flash / Generator Exchange.
Today’s object is the Insert Action Object.
This objects allows the user to dynamically insert certain Flash 4 Action Script commands into a Flash movie.
The commands that you can insert include :
The object uses a Column data source, which each row specifying an action to be inserted. Among other things, you can specify which frame the action gets inserted on, and which movie clip / timeline the action targets.
As discussed in the previous tip of the day, you can use Generator to dynamically set the value of Action Script variables. However, you can only set a String value with Generator.
Thus to set the value of a variable :
var varName = "{genVar}";
If you want to be able to use Generator to set the value of an Action Script variable to a number / integer, then you first have to use Generator to set the value as a String and then Action Script to convert the String to a number :
With a few exceptions you can place a Generator variables just about anywhere that you can type in text.
This can be used to dynamically set properties of Generator objects, File Properties, and Symbol properties, as well as allowing you to define the value of Flash Action Script variables with Generator.
While you cannot directly insert html marked up text into a Flash movie using Generator, you can do it using a combination of Generator and Flash 5 Action Script.
First, create a movie with a Dynamic Text field. Make sure that the field is set to dynamic text, and that HTML is checked. Next, give the field a variable name (we will use htmlText).
Next, insert the following Action Script on the same time line that you placed the dynamic text box :