Creating array from XML file
Currently my application uses the following arrays to populate a map with data depending on the user's selection.
<fx:Declarations>
<fx:Array id="fwo1">
<ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
<ammap:MapArea instanceName="SE" title="SWEDEN" value="4447100" customData="{dpSE}"/>
<ammap:MapArea instanceName="CH" title="SWITZERLAND" value="47100" customData="{dpCH}"/>
<ammap:MapArea instanceName="FR" title="FRANCE" value="447100" customData="{dpFR}"/>
</fx:Array>
<fx:Array id="fwo2">
<ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
<ammap:MapArea instanceName="SE" title="SWEDEN" value="2000" customData="{dpSE}"/>
<ammap:MapArea instanceName="CH" title="SWITZERLAND" value="200" customData="{dpCH}"/>
<ammap:MapArea instanceName="FR" title="FRANCE" value="20" customData="{dpFR}"/>
</fx:Array>
</fx:Declarations>
I would like to spin the country data off into one or more external XML files so that rather than being hard coded, the arrays would load the data dynamically.
<fx:Array id="fwo1">
<ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
[[include/loop through data from XML file to create rest of array]]
</fx:Array>
<fx:Array id="fwo2">
<ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
[[include/loop through data from XML file here to create rest of array ]]
</fx:Array>
After much searching, I just haven't quite found an example that will let me make the leap from hard coding to dynamically loading the data (in large part, because of the name space declaration as part of the array element).
Any suggestions would be greatly appreciated. Thanks so much.
