Task 8:  
Data provided to any Flash object must be in the specific XML format that the object requires. In this procedure, look at the Flash map documentation for this information, then generate an XML data string that provides data in the required format.
In the online Help for Flash maps, choose How to use FusionMaps. This topic describes the procedure for displaying data in a map. It includes an example of displaying population data in the world map. The following is the sample XML:
<map borderColor='005879' fillColor='D7F4FF' numberSuffix=' Mill.' includeValueInLabels='1' labelSepChar=': ' baseFontSize='9'>
        <entity id='NA' value='515' />
        <entity id='SA' value='373' />
        <entity id='AS' value='3875' />
        <entity id='EU' value='727' />
        <entity id='AF' value='885' />
        <entity id='AU' value='32' />
Each XML document for maps starts with the <map> element. As the example shows, you can specify formatting attributes for the <map> element. Within the <map> element is the <data> element. The <data> element contains <entity> elements that define the data for each entity on the map. For example, <entity id='NA' value='515' /> assigns the population value 515 to the NA (North America) entity. The entity ID corresponds to the internal ID, which you saw earlier in the Map Specification Sheet for World Map.
Write code to generate an XML string that provides data defined as <entity> elements. The code needs to create the content within the <data> element. A logical place to put this code is in the OnCreate( ) method for the table’s detail row because this method executes with each retrieval of a data row from the data set.
var entityLine = "<entity id='" +
this.getRowData().getColumnValue("Territory_ID") + "' "
+ "value='" + this.getRowData().getColumnValue("SALES")
+ "'/>";
dataPart = dataPart + entityLine;
reportContext.setPersistentGlobalVariable("g_dataPart", dataPart );
The code iterates through the data rows in the data set, and builds an XML string using the Territory_ID and SALES values. The full XML string is stored as a persistent global variable so that it can be accessed anywhere in the report.
The table’s OnCreate( ) method is typical for placing start-up or initialization code for report elements in a table.

Additional Links:

Copyright Actuate Corporation 2012