|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 7/31/2008 10:54:44 AM
Posts: 9,
Visits: 24
|
|
Can I create a generic Map object, then cast it into the version I need? The following code runs, but the map is not attached. I don't think the cast works in this scenario?
//----- preloading / application messages --------------------------//
#include "com/fusionmaps/includes/LoadingFunctions.as"
#include "com/fusionmaps/includes/AppMessages.as"
import com.fusionmaps.core.Map;
import com.fusionmaps.maps.World8Map;
//----- Main() --------------------------//
var mapContainer_mc:MovieClip = this.createEmptyMovieClip("MapHolder", 1);
var xml_obj:XML = XML(LoadMapXml("World8Map.xml"));
var newMap_obj:World8Map = World8Map(CreateMap(mapContainer_mc));
newMap_obj.setXMLData(xml_obj);
newMap_obj.render();
//----- create map -------------------------------------------------//
function CreateMap(mapContainer_mc:MovieClip):Map {
map_obj = new Map(mapContainer_mc, 1, 740, 420, 26, 26, true, "EN", "exactFit");
return map_obj;
}
//----- load xml file ---------------------------------------------//
function LoadMapXml(file_str:String) {
var xml_obj:XML = new XML();
xml_obj.ignoreWhite = true;
xml_obj.load(file_str);
xml_obj.onLoad = function(success:Boolean) {
if (success) {
return xml_obj;
}
};
}
Any suggestions?
Thank you!
-- Tara Deschenes
Technimedia, LLC
Tara G Deschenes
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 7/31/2008 10:54:44 AM
Posts: 9,
Visits: 24
|
|
To close this thread, support has told me that this is not possible at this time.
Tara G Deschenes
|
|
|
|