taragdes Report post Posted December 4, 2007 (edited) 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 Edited December 5, 2007 by Guest Share this post Link to post Share on other sites
taragdes Report post Posted December 11, 2007 To close this thread, support has told me that this is not possible at this time. Share this post Link to post Share on other sites