Actionscript question:Casting to / from different map types
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Actionscript question:Casting to / from... Expand / Collapse
Author
Message
Posted 12/4/2007 1:30:09 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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
Post #3261
Posted 12/11/2007 10:52:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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
Post #3326
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 3:00am


Execution: 0.141.