Hello all,
I have been stumped on this one for over a year now. I have created a Flash
Map that functions properly with a static XML file but when I try to load a
dynamic XML generated my ColdFusion I get no results. The example can be found
at:
http://beginning.achel.org/map/works.html The one that does not work is at
http://beginning.achel.org/map/ This map should load the different states that are in the XML file but instead
it does not load any of them. The two different XML files can be found at:
http://beginning.achel.org/map/states.xml and
http://beginning.achel.org/map/states.cfm An interesting note: Firefox does not
recognize the cfm file as a XML file but IE does. This may be based on the file
extension.
The Action Script is exactly the same except that it references adifferent
file. The Flash works when published for Flash Player 6 but when I try to
publish for Player 8 even the static XML does not work.
I am probably over symplifying this but it seems logical to me. Please let me
know if you need any more information for this problem. I will post more as I
play around with it.
Thanks!
function Org(state, acronym, name, address1, address2, city, zip, email, url){
this.state = state;
this.acronym = acronym;
this.name = name;
this.address1 = address1;
this.address2 = address2;
this.city = city;
this.zip = zip;
this.email = email;
this.url = url;
}
function States(){
var e = OrgsXML.firstChild;
if (e.nodeName == "STATES") {
e = e.firstChild;
aStates = new Array();
while (e != null) {
this.map[e.attributes.state].enabled = true;
// this.map[e.attributes.state].gotoAndStop("Over");
var h = new Org(e.attributes.state,
e.attributes.acronym,
e.attributes.name,
e.attributes.address1,
e.attributes.address2,
e.attributes.city,
e.attributes.zip,
e.attributes.email,
e.attributes.url);
aStates.push(h);
e = e.nextSibling;
}
}
}
var OrgsXML = new XML();
OrgsXML.ignoreWhite = true;
OrgsXML.onLoad = function(success:Boolean) {
if (success) {
States();
} else {
trace("Load Status: error")
}
};
OrgsXML.load("states.cfm");
function loadStates() {
for (i in this.map) {
if (this.map[i] instanceof Button) {
this.map[i]._visible = false;;
}
}
for (var i:Number = 0; i < aStates.length; i++) {
this.map[aStates[i].state]._visible = true;
}
}